ODAC

Using Package Procedures

This topic describes how to create and use Oracle stored procedures and functions within the Oracle packages with ODAC.

In Oracle databases, stored procedures and functions may be grouped into specific sets which are called packages. To call a package procedure, one needs only to add the package name before the procedure's name, like "package.get_all_depts_proc". However, with ODAC using of packages may be even easier due to typed and untyped. The first ones are the classes generated by the Package Wizard, the second ones are instances of the TOraPackage class.

Untyped OraPackage may be set to represent any package specified by the name, provided that this package is available for the connection used. TOraPackage class has a set of methods intended to execute procedures and retrieve their descriptions.

Typed OraPackage is a class representing the only specific package. For each procedure or function of this package, instances of corresponding typed OraPackage have a special method. Such approach allows to invoke stored procedures just like usual object methods. Typed Oracle packages can be created using Oracle Package Wizard. For more information on this see Using Package Wizard for working with PL/SQL Packages.

See Also

© 1997-2022 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback