SAMPLE: Spvjado Demonstrates Using Stored Procedures from WFC/ADO/Java

ID: Q206452


The information in this article applies to:


SUMMARY

The Spvjado.exe sample demonstrates using the SQL Server stored procedures from the WFC ADO Java classes. The sample also contains the adoCon class, which is a complete set of the ADO version 2.0 enumerated types as described in the ADO documentation.


MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

spVJado.exe
Release Date: Mar-08-1999

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services

SpVJado.exe contains the following files:

File Name Size
adoCon.java 14,680
spVJado.sln 511
spVJado.vjp 4,562
WFCadoSP.java 15,305
Readme.txt 4,000


Upon startup, the sample creates two stored procedures: The sample demonstrates how you must close the returned ADO recordset before you can access the output and return parameters.

The sample also demonstrates ADO's automatic and manual parameter population methods. Each stored procedure uses the value in the edit box next to the label "Sel > Price" as the input parameter. The default value of the edit box is $9.99, but you can enter any value. The "spIN" button opens a forward-only, read-only recordset with the stored procedure sp_AdoVJin.

The "spInOutRtn" button opens a forward-only, read-only recordset with the stored procedure sp_AdoVJinOutRtn. Once you navigate past the end of the recordset (via the Next button), the output and return parameters are displayed.

The spIN2 button opens a read/write recordset using the sp_AdoVJin stored procedure.

Note that the constant identifiers in the class adoCon are the same constant names used in Visual Basic and Visual C++. Although WFC/ADO includes all the ADO constants in the com.ms.wfc.data.AdoTypes class, WFC does not use the same constant names as ADO; this can be confusing for some programmers. For example, from Visual Basic, Visual C++, or the ADO documentation, to choose a client cursor you would use the "adUseClient" constant; however, in WFC you would use "AdoEnums.CursorLocation.CLIENT". If you use adoCon, you can use the same ADO constant names in Visual J++ as you use in Visual C++ or Visual Basic.



© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Rick Anderson, Microsoft Corporation

Additional query words:


Keywords          : kbADO200 kbSDKDataAc kbVJ 
Version           : WINDOWS:2.0,2.1,6.0
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 9, 1999