Select the product you need help with
Adovcsp.exe Demonstrates Using Stored Procedures with ADOArticle ID: 184968 - View products that this article applies to. This article was previously published under Q184968 SUMMARY
Adovcsp.exe is a sample program that demonstrates opening keyset and
forwardOnly cursors using ActiveX Data Objects (ADO) Recordsets by executing stored procedures on Microsoft SQL Server. It also shows how to open a disconnected record set. The sample uses the Visual C++ #import feature and demonstrates ADO Recordset GetState(), Parameters GetName() and GetValue(), and many other Recordset,
Command and Connection methods.
MORE INFORMATIONThe following file is available for download from the Microsoft Download Center: ADOVCSP.EXE
Release Date: September 17, 2003
(http://download.microsoft.com/download/sql70/demo/7/nt4/en-us/adovcsp.exe)
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
(http://support.microsoft.com/kb/119591/
)
How to Obtain Microsoft Support Files from Online Services
The application assumes that you have a Microsoft SQL Server installed with the sample Pubs database. If this is not the case, change the following code in the openConn function: The OpenRd method takes an input parameter (GradYear) and passes it to the stored procedure sp_AdoTestInOut. sp_AdoTestInOut returns all the records with GradYear >= to the parameter passed. It returns an output parameter, the number of records returned and also returns a parameter (the max GradYear). The student table created is based on the Student table of the Student Enrollment database that ships with Visual C++. In this sample, the text boxes to show the Output parameter and Return code are only used when running the stored procedure by clicking the OpenRead button. Please see the source code for more details. The Supports button obtains the schema information from the database using the technique and code described in the following Microsoft Knowledge Base article: 182831
The Open DisCon button opens a disconnected recordset. This code is taken
from the following Microsoft Knowledge Base article:
(http://support.microsoft.com/kb/182831/EN-US/
)
HOWTO: Using the ADO OpenSchema Method from Visual C++184397
(http://support.microsoft.com/kb/184397/EN-US/
)
HOWTO: Getting ADO Disconnected Recordsets in VBA/C++/Java
REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
182389
(http://support.microsoft.com/kb/182389/
)
FILE: Adovcbm.exe ADO 1.5 with #import and Getrows/Bookmarks
181733
(http://support.microsoft.com/kb/181733/
)
FILE: Adovcbtd.exe #import Using UpdateBatch and CancelBatch
220152
(http://support.microsoft.com/kb/220152/EN-US/
)
FILE: Sample: ADOVC1 Simple ADO/VC++ Application
200122
(http://support.microsoft.com/kb/200122/EN-US/
)
SAMPLE: ATL2ADO returns disconnected recordset from COM to VB
229088
(http://support.microsoft.com/kb/229088/EN-US/
)
SAMPLE: Vcspnp.exe Demonstrates Passing SQL NULL Parameters and Reading NULL Values with ADO
PropertiesArticle ID: 184968 - Last Review: August 9, 2004 - Revision: 5.3 APPLIES TO
|


Back to the top








