This program lets you test your driver class name, connection info
string, and all the other stuff that goes into the DataVision database
connection dialog box.
To compile and run using Ant, specify the all of the command line args
using the single property "cmdline". Here is an example:
% ant -Dcmdline="-d driver -c conninfo" conntest
To compile and run using make, use "make conntest". To run, type the
following on a single line (broken up for readability):
java -classpath classes:path-to-driver.jar examples.ConnectionTest
[-v] -d driver -c conninfo [-s schema] -u username [-p password]
Both the -s and -p options are...um...optional.
As an example, here is how I run the test:
java -classpath classes:/usr/lib/pgsql/pgjdbc2.jar
examples.ConnectionTest -d org.postgresql.Driver
-c jdbc:postgresql://localhost/dv_example -s dv_example -u jimm -v
The -v option turns on verbose mode; messages describing the
progress of establishing the connection are printed as is a list of
all the table names in the schema.
The -h option prints a help message.
author: Jim Menard, jimm@io.com |