Most Java Database Connectivity (JDBC) drivers can be downloaded for free from your database vendor's website.
They are usually distributed in a compressed format (i.e. zip file). Installation of the driver on your system
depends on the type of the driver and can be vendor specific. We recommend using type 4 JDBC drivers with JCodeBox
at least initially so that if you have any connectivity problems, they are easier to resolve. Installation of most
type 4 JDBC drivers usually just involves expanding the downloaded file onto your hard disk. Once expanded, the
driver is usually in an archive file format (i.e. jar or zip). Consult your database vendor's documentation for
details specific to your driver.
Register driver
In the main JCodeBox window, right mouse click on Database Drivers and select Add Driver...
The Add Driver dialog will be displayed.
Enter a name for your driver (e.g. PostgreSQL)
Use the Browse button to locate the JDBC driver file/archive (e.g. jconn2.jar for Sybase)
Consult your database vendor's documentation for details specific to your driver.
If JCodeBox doesn't automatically locate the JDBC driver class in the archive, enter the class name into the class field.
If your driver consists of multiple files, select one of the files in the Add Driver dialog and add the others directly
to the JCodeBox classpath using the Edit Classpath dialog (Tools->Classpath... menu)
Click OK to commit your changes then re-start JCodeBox for the changes to take effect.
Repeat the above for any other JDBC drivers you wish to use with JCodeBox.
Your driver(s) should now be displayed in the main JCodeBox window. If a driver is shown in read it means JCodeBox was unable
to load the necessary driver classes (either the driver class name or the location could be incorrect). To correct this right
mouse click on the driver, choose Edit... and correct the class name/location for the driver.
Add connection
In the main JCodeBox window, right mouse click on a Database Driver and select Add Connection...
The Add Connection dialog will be displayed.
Enter a name for your connection (e.g. CustomerDB)
Enter the URL for your connection
Consult your database vendor's documentation for the exact format of the URL (Also see our Sample JDBC URLs section at the end of this chapter).
Enter the User ID required to connect to this database
Enter the password required to connect to this database
Click OK to commit your changes.
Test connection
Double click on the connection to see a list of available schemas/catalogs
If an error message is displayed, correct the error and retry.
Double click on a schema/catalog to see a list of available table types
Double click on a table type to see a list of available tables
Double click on a table to see it's definition displayed in the right hand window pane
You can now generate J2EE applications directly from a database.
Simply right mouse click on a connection and select Generate Application.