How to access Overloaded Stored Procedure

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
wnielsenbb
Posts: 3
Joined: Mon 01 May 2017 17:31

How to access Overloaded Stored Procedure

Post by wnielsenbb » Fri 19 Jan 2018 22:04

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?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How to access Overloaded Stored Procedure

Post by MaximG » Wed 24 Jan 2018 07:54

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

wnielsenbb
Posts: 3
Joined: Mon 01 May 2017 17:31

Re: How to access Overloaded Stored Procedure

Post by wnielsenbb » Fri 26 Jan 2018 00:53

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.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How to access Overloaded Stored Procedure

Post by MaximG » Wed 31 Jan 2018 15:43

Thank you for the information. We will investigate this behavior. We will inform you about the results shortly.

Post Reply