Delphi Clinic | C++Builder Gate | Training & Consultancy | Delphi Notes Weblog | Dr.Bob's Webshop |
|
Adding JDBC drivers to JBuilder
We use JDBC drivers to connect to databases.
Most database vendors have got specific JDBC drivers, which
aren't support by default in JBuilder. We can experience
problems with this if you try to access the database from
within the JBuilder IDE. For example if we use the
DataExpress components and try to create a query with
the dataset property editor, we can get errors.:
Because we access the database from within the IDE, we must add the JDBC drivers for that database to the classpath of JBuilder itself. We can use the driver in the visual tools of JBuilder once it is in the classpath of the IDE.
We can change the classpath in the file jbuilder.ini we find in the bin folder of our JBuilder installation. Look for the line which starts with Djava.class.path= in the JavaVM_Properties section. This is where we set the classpath and here we add the JDBC driver class files for the specific database we want to use.
We have to change a different file in JBuilder 3.5 FE, than with JBuilder 3.0. The classpath is set in the batch file, which starts up JBuilder. We can this batch file in the bin folder of the JBuilder installation. At the end of the file we see a line starting with set CLASSPATH. Here we must add the JDBC driver classes.
Once the driver is added to the classpath of the IDE, we will not encounter the errors anymore.