Select the product you need help with
How To Retrieve Recordsets from Oracle Stored Procedures Using ADOArticle ID: 176086 - View products that this article applies to. This article was previously published under Q176086
For a Microsoft Visual Basic .NET version of this article, see 321718
(http://support.microsoft.com/kb/321718/EN-US/
)
.
For a Microsoft Visual Basic .NET version of this article, see 308072
(http://support.microsoft.com/kb/308072/EN-US/
)
.
For a Microsoft Visual Basic .NET version of this article, see 308073
(http://support.microsoft.com/kb/308073/EN-US/
)
.
On This PageSUMMARY This article shows how to create a Visual Basic 5.0 and
ActiveX Data Objects (ADO) project or a Visual Basic 6.0 and ADO project that
returns a typical Recordset from an Oracle stored procedure. This article
builds on the concepts covered in the following Microsoft Knowledge Base
article:
174679 It is almost identical to the following article in
the Microsoft Knowledge Base article that covers the topic using Remote Data
Objects (RDO):
(http://support.microsoft.com/kb/174679/EN-US/
)
How To Retrieve Typical Resultsets From Oracle Stored Procedures
174981 NOTE: Microsoft recommends that you use the Microsoft ODBC Driver for
Oracle.
(http://support.microsoft.com/kb/174981/EN-US/
)
How To Retrieve Typical Resultsets From Oracle Stored Procedures
MORE INFORMATION The following Knowledge Base article gives an in-depth
example, using RDO, of all the possible ways to return a Recordset back from a
stored procedure. The example in this article is a simplified version:
174679 NOTE: The Recordsets created by the Microsoft ODBC Driver for Oracle ,
using Oracle stored procedures, are Read Only and Static. Retrieving a
Recordset requires you to create an Oracle Package.
(http://support.microsoft.com/kb/174679/EN-US/
)
How To Retrieve Resultsets from Oracle Stored Procedures
You can create the sample project in this article in Visual Basic 5.0 or 6.0 and use ADO to access and manipulate the Recordsets created by the Microsoft ODBC Driver for Oracle version. You must have this driver to use the recordsets-from-stored-procedures functionality discussed in this Knowledge Base article: 174679 (Currently, it is the only driver on the market
that can return a Recordset from a stored procedure.) If you want additional
information about using Visual Basic with Oracle, please see the following
Knowledge Base article, which uses RDO 2.0 in its examples:
(http://support.microsoft.com/kb/174679/EN-US/
)
How To Retrieve Resultsets from Oracle Stored Procedures
167225 NOTE: You must acquire and install the MDAC 2.1 or later stack for the
sample in this article. The following Microsoft Knowledge Base article explains
how to get the Oracle and MDAC components:
(http://support.microsoft.com/kb/167225/EN-US/
)
How To Access an Oracle Database Using RDO
175018 MDAC 1.5 contains ADO 1.5 and the Microsoft ODBC
Driver for Oracle version 2.0.
(http://support.microsoft.com/kb/175018/EN-US/
)
How To Acquire and Install the Microsoft Oracle ODBC Driver
The MDAC 2.x stack, which includes the 2.573 driver, can be downloaded from the following Web address: http://msdn.microsoft.com/en-us/data/aa937729.aspx This article is broken up into two parts. The first part is a
step-by-step procedure for creating the project. The second part is a detailed
discussion about the interesting parts of the project.
(http://msdn.microsoft.com/en-us/data/aa937729.aspx)
Step-by-Step Example
174679 you must specify the maximum number of rows you
will be returning. Please refer to the Microsoft ODBC Driver for Oracle Help
File and Knowledge Base article Q174679 for more information on this issue.
(http://support.microsoft.com/kb/174679/EN-US/
)
How To Retrieve Resultsets from Oracle Stored Procedures
When you click on the "Get One," button it brings up an input box that prompts you for an SSN. Once you input a valid SSN and click OK, this query is executed: NOTE: You can only define input parameters for Oracle stored procedures that return a Recordset. You cannot define output parameters for these stored procedures. These two stored procedures cover the basic uses of stored procedures that return Recordsets. The first one will give you a predefined set of records (i.e. everyone) and the second one will give you a set of records (or just one record) based on one or more input parameters. Once you have these recordsets, you can do inserts, updates, and deletes either through stored procedures or SQL that you create on the client. REFERENCES Microsoft ODBC Driver for Oracle Help File "Oracle PL/SQL Programming" by Steven Feuerstein "Hitchhiker's Guide to Visual Basic & SQL Server" by William Vaughn For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base: 174679
(http://support.microsoft.com/kb/174679/EN-US/
)
How To Retrieve Resultsets from Oracle Stored Procedures
175018
(http://support.microsoft.com/kb/175018/EN-US/
)
How To Acquire and Install the Microsoft Oracle ODBC Driver
174981
(http://support.microsoft.com/kb/174981/EN-US/
)
How To Retrieve Typical Resultsets from Oracle Stored Procedures
167225
(http://support.microsoft.com/kb/167225/EN-US/
)
How To Access an Oracle Database Using RDO
PropertiesArticle ID: 176086 - Last Review: March 14, 2005 - Revision: 8.5 APPLIES TO
| Article Translations |


Back to the top








