ADO Java Sample
ADOJAVA demonstrates how to use ADO from Java and Java/COM integration. It is installed to c:\Platform SDK\Samples\DataAccess\ado\Java.
This sample can be executed as an applet in a browser or as a stand-alone application. It opens an ADO Recordset, displays the current record, and allows the user to click buttons to move through the data. It also shows the usage of command line parameters.
To run ADOJAVA
- This sample uses an ODBC DSN called OLE_DB_Nwind_Jet with a user id of Admin and a blank password. Set up an ODBC system DSN on the Web Server computer called OLE_DB_NWind_Jet. Click Start, point to Programs, and point to Administrative Tools. Choose Data Sources (ODBC).
- On the System DSN tab, click Add. Select "Microsoft Access Driver (.mdb)" from the list of available drivers. Click Finish.
- In the ODBC Microsoft Access Setup dialog box, enter "OLE_DB_NWind_Jet" in the Data Source Name box. In the Description box, enter "MDAC SDK Sample Data."
- Under Database, click Select and locate <drive>:\Platform SDK\Samples\DataAccess\ado\xml. Select Nwind.mdb. Click OK.
- In the ODBC Microsoft Access Setup dialog box, click OK. Click OK again in the ODBC Data Source Administrator dialog box.
- Open the project file, Simpleado.vjp, in Microsoft Visual J++ 6.0 or later.
- From the Debug menu, choose Start.
- If you want to run in a different mode, from the Project menu, choose simpleado Properties.
- On the Launch tab, click the box When project runs, load and select one of the three modes.
- Click OK and run as in Step 3 above.