Page 1 of 1

How to access Overloaded Stored Procedure

Posted: Fri 19 Jan 2018 22:04
by wnielsenbb
Probably a dumb question, but I can't figure out how to access an overloaded stored procedure.
I have a package with two procedures with different names. How do I access a particular one?

Re: How to access Overloaded Stored Procedure

Posted: Wed 24 Jan 2018 07:54
by MaximG
If you use two procedures with different names in the same package, you can specify the name of this package as the value of the SQLStoredProc.PackageName property, and the procedure name - SQLStoredProc.StoredProcName

Re: How to access Overloaded Stored Procedure

Posted: Fri 26 Jan 2018 00:53
by wnielsenbb
It is package with two procedures with the same name. One gets customer info given the customerId and the second gets customer info given the customerNumber.

Package CustomerFunctions
Procedure GetCustInfo
( customerId IN Customer.CustomerId%Type,
pList OUT NOCOPY SYS_REFCURSOR
);
Procedure GetCustInfo
( customerNumber IN Customer.CustomerNumber%Type,
pList OUT NOCOPY SYS_REFCURSOR
)
When I make a TSQLStoredProc and assign package='CustomerFunctions' and storedProcName = 'GetCustInfo' I get all 4 parameters.
My workaround is to turn Paramcheck off and manually create parameters, but that is unwieldy and the next time the dba decides to overload another function that one will break.

Re: How to access Overloaded Stored Procedure

Posted: Wed 31 Jan 2018 15:43
by MaximG
Thank you for the information. We will investigate this behavior. We will inform you about the results shortly.