10.07.2015 Views

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Testing <strong>JDBC</strong> and the database connectionThe %ORDB%\demo\jdbc\samples directory contains sample programs for the<strong>Cincom</strong> ORDB <strong>JDBC</strong> driver. The jdbcHelloWorld.java program is designedto test <strong>JDBC</strong> and the database connection. The program queries you for thefollowing information:♦♦User namePassword♦ Name of a database to which you want to connectFor a complete list of the sample program names, see "Sample programs" onpage 95.The sample code in the %ORDB%\demo\jdbc\samples directory belongsto the demo.jdbc.samples package.Running the jdbcHelloWorld.java program1. Access a running database.2. Open the %ORDB%\demo\jdbc\samples\ directory, and compile and run thejdbcHelloWorld.java program.- Sample compilation command from the command prompt (Windows NTwith SUN’s JDK):javac –classpath %ORDB%\demo\jdbc\samples\jdbcHelloWorld.java- Sample run command from the command prompt:java –cp %ORDB%\ordbjava.jar;%ORDB%demo.jdbc.samples.jdbcHelloWorldIf the results of the query print without error, then your Java and <strong>JDBC</strong>installations are correct.<strong>JDBC</strong> <strong>Developer's</strong> <strong>Guide</strong>, P25-9504-03 Page 15Chapter: 2. Verifying a <strong>JDBC</strong> Driver installationSection: Check the environment variables

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!