Page 1 of 1

Picking the RIGHT Stored Procedure when they have the same name

Posted: Fri 04 Mar 2005 22:24
by Marty Cullen
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

Posted: Sat 05 Mar 2005 10:51
by Alex
You can use TOraStoredProc.Overload property to select one of the overloaded procs.
Pls. see TOraStoredProc.Overload topic in ODAC help.

Overloaded Stored Procs

Posted: Mon 07 Mar 2005 14:28
by Marty Cullen
That works.

thanks