by Wei Tang
jSQLRunner is a pure Java package aiming at providing a uniform access
interface to databases from various vendors via JDBC connection.
Theoretically, jSQLRunner can access any database system that supports JDBC.
Some sample database vendors are:
- DB2 Universal Database
- SimpleText DB
- SQL Server
- OS: ANY! (since it's Java :-)
- JDK1.2 and above
- Any one of the supported database sources. Some provide evaluation
copies (Oracle, DB2) or free download (InstantDB, MySQL, SimpleText DB, and
No installation needed. Get the
(including separate jar files) and
uncompress it. Or you can download the
Executable Jar file bundled with
SimpleText DB driver and tinySQL driver.
4. Running jSQLRunner
After you have unzipped the downloaded file, you can run it from the shell.
For example (if you are using SimpleText DB driver):
java -cp jsql20.jar:cqutil.jar:gnu.jar:simpleTX.jar disl.export.jsqlrunner.jSQLRunner
java -cp jsql20.jar;cqutil.jar;gnu.jar;simpleTX.jar disl.export.jsqlrunner.jSQLRunner
If you are using the executable Jar file,
Under Windows, double click the file to run. Or type:
java -jar jsql20bundle.jar
Under Unix/Linux, type:
java -jar jsql20bundle.jar
Note: you must set up the correct java classpath environment.
We also provide an
of jSQLRunner using Java Web Start technology (
test whether you have JWS installed).
Click the image below:
5. jSQLRunner query output formats:
The following formats for query result are provided:
- table format in the Java window
- HTML table format (plain text)
- HTML format for the query result table header only (plain text)
- column count followed by column names, then column data (plain text)
- raw result with predefined separators (rows & columns) (plain text)
- raw result header with predefined separators (plain text)
- raw result header only (plain text)
- XML format (predefined DTD) (plain text)
- XML format for the query result table header only (plain text
6. About JDBC:
- Type 1:
- The JDBC-ODBC bridge provides JDBC API access via most ODBC drivers. Note that some ODBC binary code and in many cases database client code must be loaded on each client machine that uses this driver, so this kind of driver is most appropriate on a corporate network, or for application server code written in the Java programming language in a 3-tier architecture.
- Type 2:
- A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.
- Type 3:
- A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol This net server middleware is able to connect all of its Java technology-based clients by a server.to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security, access through firewalls, etc., that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products.
- Type 4:
- A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver. Several database vendors have these in progress.
Figure 1: connection panel
Figure 2: query panel (1)
Figure 3: query panel (2)
© Copyright 2003, Disl Group, by Wei Tang (firstname.lastname@example.org)