SQLClient

Quick Start

SQLClient is a Java application. The main class for SQLClient is com.ice.sqlclient.SQLClient. Assuming that your current directory is the one you extracted from the archive, you might use the following command to start the application:

Under UNIX:

java -classpath "classes:$CLASSPATH" com.ice.sqlclient.SQLClient

Or

Under Windows:

java -classpath "classes;%CLASSPATH%" com.ice.sqlclient.SQLClient

Details

In order to use SQLClient, you must provide for several items:

Once you have met the above requirements, you must modify the defaults.txt file so that SQLCLient knows where you driver is, and other configuration items to make the program display well.

The important properties to check are:

You may define profiles to help you fill in these values in the Host Info panel of the SQLClient application. Each profile appears in the combobox in that panel, allowing you to connect to any of a number of pre-defined databases.

The property SQLClient.profiles lists the profiles. This is a colon separated list of profile names. For each name in the list, there must also be a profile definition property. The default profile is defined by the property SQLClient.sqlProfile.

For each profile name in the list of profiles, there will be a property named SQLClient.profile.PROFNAME, where 'PROFNAME' is the profile's name.

Profiles are colon separated strings with fields:

SQLClient allows you to define any number of drivers. This allows you to connect to entirely different databases without having to reconfigure. Drivers are defined by properties with the name SQLClient.jdbcDriver.N, where the 'N' is an integer from 1 to 100. Each driver property is a colon separated string, where the fields are:

Finally, you can start SQLClient. The main class is 'com.ice.sqlclient.SQLClient'. You only need to include the sqlclient.jar file in your classpath. Here is a typical invocation:

	java -classpath $CLASSPATH:sqlclient.jar com.ice.sqlclient.SQLClient

Adding New DB Support

To add support for a new database to SQLClient, you have to perform several steps.

  1. Create a client handler class similar to MySQLClient that extends SQLClientHandler. This class knows how to open your database, as well as perform some common requests that SQLClient works on. HSqlClient is another example of a client handler.

  2. Add your client handler to those known to SQLClient by adding code to the SQLClient.loadJDBCDrivers() method, similar to the code for MySQL and hSQL.

  3. Add the properties to defaults.txt defining your driver mapping. The property name is 'SQLClient.jdbcDriver.N', where N must be a unique integer incrementing among all definitions. In other words, SQLClient has a for loop where i = 1 to N loading driver properties until it gets a null returned (no more defined). A gap in N will prematurely end the list.


Copyright (c) 1998-2000 By Timothy Gerard Endres
SQLClient is licensed to you under the GNU General Public License.