News

Tuesday, June 19, 2007

How To Retrieve Resultsets from Oracle Stored Procedures

SUMMARY

This article demonstrates how to use Visual Basic Enterprise Edition, Remote Data Object (RDO), the Microsoft ODBC Driver for Oracle version 2.0 and higher, and an Oracle PL/SQL package to retrieve resultsets from an Oracle stored procedure.
 

MORE INFORMATION

With the release of the Microsoft ODBC Driver for Oracle version 2.0 and higher, you can now retrieve resultsets from Oracle stored procedures. By creating Oracle stored procedures that return parameters of type TABLE, you can return row and column data that can then be manipulated and displayed as a resultset. This article uses the example in the Help file for the Microsoft ODBC Driver for Oracle v2.0 and shows how to use that example in Visual Basic.

NOTE: The resultsets created by the Microsoft ODBC Driver for Oracle version 2.0 and 2.5 using Oracle stored procedures are READ ONLY and STATIC. To retrieve a resultset requires that an Oracle Package be created.

Before you can start working with the Visual Basic application, you must create an Oracle package called SimplePackage. SimplePackage is taken from the Help File for Microsoft ODBC Driver for Oracle: Advanced Topics: "Returning Array Parameters from Stored Procedures."

No comments: