Obtain stored procedure metadata for a procedure within an Oracle package using ADO.NET
Posted
by alwayslearning
on Stack Overflow
See other posts from Stack Overflow
or by alwayslearning
Published on 2010-05-18T13:39:09Z
Indexed on
2010/05/18
14:11 UTC
Read the original article
Hit count: 307
Hi,
I am trying to obtain the stored procedure metadata (procedure name,parameter types,parameter names etc) for a procedure declared within an Oracle package, using the standard ADO.NET API - DbConnection.GetSchema call. I am using the ODP driver.
I see that the Package is listed in the 'Packages' and 'PackageBodies' metadata collections. The procedure parameter appears in the 'Arguments' and 'ProcedureParameters' collections. I do not see a way to get to the procedure information via the package metadata. Even if the procedure does not have any parameters there is a row in the 'ProcedureParameters' collection for this procedure.
My question: To obtain the procedure metadata do I have to query the 'ProcedureParameters' collection and search for an entry with the required package name? I can then construct the procedure metadata based on the parameter information. Is there a shorter or quicker way to obtain the same information?
© Stack Overflow or respective owner