Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exec Arbitrary Stored Proc

Status
Not open for further replies.

Chao

MIS
Jun 17, 2002
27
0
0
US
Hi,

Here is the general scope of my issue. I need to execute an arbitrary stored procedure/function. Only the name of the procedure is available and it is the result of a lookup from a table. At this point, I do not know the arguments (argument name, in or out or the data type) the arbitrary procedure requires in advance.

I have written a prcedure that will run any arbitrary (Run_Arbitrary) procedure, however, the limitation is I need to list the arbitrary procedure's argument information(i.e. modes (in/out), and data type, value) and pass the information to my Run_Arbitrary stored procedure. I would like to be able to dynamically build this argument list so that it will be generic. To over come this limitation, I query the user_arguments view, hoping it would provide me with information on building the parameter list. This is where I am having a problem:
- How do I determine the order of the parameter and if function overloading exists:
- How do I group the parameter entries from User_Arguments that belongs to each overloading function?

Here's an example of the columns returned data querying User_Arguments:

Select * from User_Arguments
Where Package_Name = name_of_package
ANDn Object_Name = name_of_procedure_function;

Return Columns:
Package_Name
Object_Name
OverLoad
Argument_Name
In_Out
Position
Sequence
Data_level
Data_Type
Data_Length
Data_Precision
Data_Scale
Type_Owner
Type_Name
Type_SubName
Type_Link
Default_Value
Default_Length
...
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top