SAMPLE: Vjparam.exe Demonstrates Parameterized Queries Using JDBC/ODBC Bridge (248188)



The information in this article applies to:

  • Microsoft Visual J++ 6.0

This article was previously published under Q248188

SUMMARY

The Vjparam.exe sample demonstrates how to use parameters with a SQL query using the JDBC/ODBC bridge. It uses the pubs database on a SQL Server back end to show how to:
  • Use the java.sql.Statement class to embed a parameter in the query. The result is displayed after the query executes.
  • Use the java.sql.PreparedStatement class to bind parameters with the SELECT statement. The result set is displayed after the query executes.
  • Use the java.sql.CallableStatement class to pass a parameter to a stored procedure.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
Release Date: July 5, 2001

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 How to Obtain Microsoft Support Files from Online Services

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. The Vjparam.exe file contains the following files:

File nameSize
Parameterized.sln523 bytes
Parameterized.vjp4.46 KB
Parameterized.java4.23 KB

Modification Type:MinorLast Reviewed:8/5/2004
Keywords:kbdownload kbfile kbhowto kbJava kbJDBC KB248188 kbAudDeveloper