Picking the RIGHT Stored Procedure when they have the same name

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Marty Cullen

Picking the RIGHT Stored Procedure when they have the same name

Post by Marty Cullen » Fri 04 Mar 2005 22:24

I am accessing a DB that I can execute StoredProcs on, but can not modify it. The creators created 2 procs with the same name.
One takes one param and the other 2. They were declared as follows:

PROCEDURE ImportOrderFile( avFile IN VARCHAR2 );
PROCEDURE ImportOrderFile( avFile IN VARCHAR2, avErrFile IN OUT VARCHAR2 );

I need to use the one with 2 params, but my TOraStoredProc only sees the first one declared. Presumably because it is declared first.
When I call:

procImport.Params.Count
I get back ONE


How do I get to the other Stored Proc?


thanks

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Sat 05 Mar 2005 10:51

You can use TOraStoredProc.Overload property to select one of the overloaded procs.
Pls. see TOraStoredProc.Overload topic in ODAC help.

Marty Cullen

Overloaded Stored Procs

Post by Marty Cullen » Mon 07 Mar 2005 14:28

That works.

thanks

Post Reply