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?
How to access Overloaded Stored Procedure
Re: How to access Overloaded Stored Procedure
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
-
- Posts: 3
- Joined: Mon 01 May 2017 17:31
Re: How to access Overloaded Stored Procedure
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.
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
Thank you for the information. We will investigate this behavior. We will inform you about the results shortly.