Installing and setting up

To step through and run many of the database tutorials included in this book, you'll need to install these software components:

Note: All versions of JBuilder provide direct access to SQL data through the JavaSoft JDBC API. Some versions of JBuilder provide additional DataExpress components (on the Data Access tab of the Component Palette) that greatly simplify RAD visual development of database applications, as described in this book. Refer to the JBuilder product page from the Borland Web site at http://www.borland.com for availability of features in each JBuilder version.

The following support topics are also included in this chapter:


Installing JBuilder, JDBC, and the JDBC-ODBC Bridge

When you install JBuilder, select Typical. Or select the Program Files option from the Custom Options Selection. Both options include installation of JBuilder as well as JDBC, the JDBC-ODBC bridge, and JBuilder sample files.

JDBC and the JDBC-ODBC bridge

JBuilder JBCL DataExpress components are implemented using the JavaSoft(tm) database connectivity (JDBC) Application Programmer Interface (API). To create a Java data application, the JavaSoft (tm) JDBC sql package must be accessible before you can start creating your data application. If your connection to your database server is through an ODBC driver, you also need the JavaSoft (tm) JDBC-ODBC bridge software.

The JDBC portion of the setup program installs the classes from the java.sql package in the classes.zip file in the jbuilder\java\lib\ directory.

The JDBC-ODBC bridge portion of the setup program installs the JDBC-ODBC bridge classes in the same classes.zip file. The JdbcOdbc.dll file is installed in the jbuilder\java\bin directory.

For more information about JDBC or the JDBC-ODBC bridge, visit the JDBC(tm) Database Access API Web page at http://splash.javasoft.com/jdbc/.

Installing JBuilder sample files

The JBuilder samples directory contains files necessary for various tutorials and examples presented in this manual. These files are installed by default to the samples\borland\samples\tutorial\dataset directory of your JBuilder installation.

The Typical setup option installs the sample files to your JBuilder directory. Or choose the Custom setup and select the Sample Files option.

Installing Local InterBase Server

After installing JBuilder, run the setup program (Setup.exe) for Local InterBase Server version 4.2 or later, and follow these steps:
  1. Use the default choices.
    Note: The Local InterBase install.txt recommends that you allow InterBase to install into the default directories specified by the setup program.

  2. Allow the setup program to modify your TCP/IP services file.

  3. When the ODBC Configuration dialog appears, press Next to add Data Sources.

  4. On the Data Sources dialog, select "InterBase 4.x Driver by Visigenix" from the list of drivers. Click the Setup button.

    Note: If the "InterBase 4.x Driver by Visigenix" is not listed, click the Add button and select this driver to add it to the list. Once it appears in the list, select it and click the Setup button.

  5. To set up the Data Source Name, from the InterBase ODBC Configuration dialog:

    For this optionMake this choice

    Data Source Name DataSet Tutorial
    Description Optional. You can leave this blank
    Network Protocol <local>
    Database Select the employee database employee.gdb, from your InterBase directory; the default location for this file is
    c:\Program Files\Borland\IntrBase\EXAMPLES\employee.gdb
    Username SYSDBA
    Password masterkey

Click Close to close the DataSources dialog. If you see a message that some files could not be updated because they were in use and will wait for next system reboot, reboot your system. If no message appears, launch the Local InterBase Server in your startup folder.

Tips on using InterBase

Connecting to Borland databases

You can connect JBuilder applications to databases created with other Borland applications such as C++ Builder, Delphi, IntraBuilder, Paradox, or Visual dBASE. To do so, look at the underlying database that your application connects to and determine whether the database is a local or remote (SQL) database.

The two options when connecting to local databases such as Paradox or Visual dBASE are:

To connect to a remote SQL database, you need either of the following: