Re: Existance of stored procedure

From: Prasad Kulkarni (prasad.kulkarni_at_mailcity.com)
Date: 02/17/04


Date: 16 Feb 2004 21:17:42 -0800

Hello,

   Thanks for all the answers. I also found that the TSession class
has a function called "GetStoredProcNames" which returns the names of
all the stored procedures.

Regards
Prasad

"Bjørge Sæther" <bjorge@hahaha_itte.no> wrote in message news:<9ycYb.4610$rj4.64870@news2.e.nsc.no>...
> Prasad Kulkarni wrote:
> > Jeremy Collins <jd.collins@ntlworld-not.com> wrote in message
> > news:<xj1Xb.4723$vo1.4578@newsfep4-winn.server.ntli.net>...
> >> Prasad Kulkarni wrote:
> >>
> >>
> >>> I want to execute a stored procedure, if it exists on the databse
> >>> else not.
> >>
> >> Which database engine are you talking about?
> >
> >
> > If posiible i need it to be Database independent, because our
> > software runs on many databases such as Oracle, Informix and SQL
> > server.
>
> I believe you'll have to do slightly different SQL using these 3 db's, and
> it's no worse using SQL for checking whether the procedure exists.
>
> In Oracle:
> SELECT COUNT(*) FROM ALL_PROCEDURES WHERE PROCEDURE_NAME = 'MY_PROC'
>
> ...the others I don't know (MS uses prefix 'SYS%' on system tables/views, I
> believe)



Relevant Pages

  • Re: how to code to avoid SQL insertion attacks
    ... > However i see only 1 reasonable reply, and that is to use stored procedures, ... He only mentioned Oracle after I queried him about it. ... In SQL, ... that is also an egregious programmer error which just as well could ...
    (comp.lang.java.programmer)
  • Re: Insert Date and Time in SQL Server 2000 using ASP
    ... > applications that actively communicate with SQL Server, ... Oracle any more than necessary") but we have a single application that works ... The effort to code the SQL logic into 3 separate sets of stored procedures ...
    (microsoft.public.inetserver.asp.db)
  • Re: Insert Date and Time in SQL Server 2000 using ASP
    ... > applications that actively communicate with SQL Server, ... Oracle any more than necessary") but we have a single application that works ... The effort to code the SQL logic into 3 separate sets of stored procedures ...
    (microsoft.public.inetserver.asp.general)
  • Re: Existance of stored procedure
    ... > If posiible i need it to be Database independent, ... > software runs on many databases such as Oracle, Informix and SQL ...
    (comp.lang.pascal.delphi.misc)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)