How can I retrieve metadata with ODAC?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ivsal
Posts: 4
Joined: Sat 11 Jun 2005 13:43

How can I retrieve metadata with ODAC?

Post by ivsal » Sat 11 Jun 2005 13:56

I need the Oracle data type of SPs parameters.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 14 Jun 2005 12:18

You can use TOraStoredProc object, set the StoredProcName property to desired value, and Prepare it. In Params you will get all stored proc parameters with they types. Alternative way is to use SQL query, for example something like this:

Code: Select all

SELECT argument_name, data_type, in_out, data_length, data_precision, data_scale, default_value
FROM sys.all_arguments WHERE object_name = :MyStoredProcName AND owner = :MySchema AND data_level = 0 AND package_name IS NULL ORDER BY 1

Post Reply