If you have the Client/Server version of JBuilder, you may also want to install the following software components, depending on your needs:
When you install JBuilder, select Typical. If you select Custom, you should select the following options:
JavaSoft worked in conjunction with database and database tool vendors to create a DBMS independent API. Like ODBC (Microsoft's rough equivalent to JDBC), JDBC is based on the X/Open SQL Call Level Interface (CLI). Some of the differences between JDBC and ODBC are:
According to JavaSoft's web site, JDBC is been endorsed by leading database, connectivity, and tools vendors including Oracle, Sybase, Informix, InterBase, DB2. Several vendors, including Borland, have announced availability of JDBC drivers in products like DataGateway. Existing ODBC drivers can be utilized via the JDBC-ODBC bridge provided by JavaSoft. Using the JDBC-ODBC bridge is not an ideal solution since it requires the installation of ODBC drivers and registry entries. ODBC drivers are also implemented natively which compromises cross-platform support and applet security.
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 Database Access API Web page at http://splash.javasoft.com/jdbc/.
To connect to a remote SQL database, you need either of the following:
The two options when connecting to local, non-SQL databases such as Paradox or Visual dBASE are:
If you encounter any problems connecting to a JDBC database, see the topic Troubleshooting JDBC database connections in the tutorials.
The database sample applications use sample data provided with Local InterBase Server.
Note: The Local InterBase install.txt recommends that you allow InterBase to install into the default directories specified by the setup program.
Note: If the "InterBase 4.x Driver by Visigenic" 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.
For this option | Make 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 Data Sources 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 from your InterBase program group. InterBase will launch on Windows Startup, by default. To change this to manual startup, run InterBase Configuration from the InterBase program group and change the startup mode. InterBase must be running in order to work through the tutorials in this book.
These constraints affect all examples where you add, insert, or update data from the employee table and attempt to save the changes back to the server table, for example, the Basic resolving topic.
Select View|Metadata information from the InterBase Windows ISQL tool (included with the Local InterBase installation) to explore the constraints on the employee and other tables in the sample InterBase databases. To view the metadata, you must first connect to a database by running InterBase Server, then selecting File|Connect to Database from the InterBase ISQL menu. Browse to the employee.gdb database in the InterBase EXAMPLES directory.
Note: InterBase passwords are case-sensitive; the passwords "masterkey" and "MasterKey" are not equivalent. "MasterKey" will not succeed as a default password for the "SYSDBA" user name.
DataGateway provides Java developers with a multi-tier, fast, and reliable database connectivity solution adhering to industry-standard JDBC. It consists of an all-Java connection to BDE (the Borland Database Engine), which in turn can access a wide range of SQL Servers and desktop databases. DataGateway provides native connectivity to Oracle, Sybase, DB2, Microsoft SQL Server, Informix, InterBase, Paradox, dBASE, Microsoft FoxPro, and Microsoft Access. DataGateway also provides additional connectivity through standard ODBC drivers. DataGateway's client JDBC driver is written entirely in Java and can run on all Java virtual machines that support JDK 1.1. The DataGateway Server currently supports Windows NT and Windows 95. DataGateway has these major benefits:
To install DataGateway, first install JBuilder so that the DataGateway installation can update JBuilder's IDECLASSPATH and CLASSPATH correctly. Then, run install.exe from the JBuilder CD, and select DataGateway. Accept the default choices, except as noted below. Do not run JBuilder during the DataGateway installation. Complete documentation and samples will be installed. If you plan to use DataGateway locally, choose the following installation options:
If you plan to use DataGateway on a Windows middle-tier server, choose the following installation options on the server machine:
Then select the option DataGateway Client for installation on one or more local machines.
After DataGateway has been installed, it can be accessed through the connection property of a Database component. In the connection property editor, select Choose URL. The Choose a Connection URL dialog is displayed. By default, InterBase Data Sources are displayed. If DataGateway is installed, it is automatically detected and the Borland DataGateway box is available with the following options:
If you select the Local button, JBuilder will build an URL for every BDE alias you have on your client machine and add them to the list of available URLs. This enables you to connect with local desktop databases, such as Paradox tables.
Before you select the Remote button, JBuilder requires a machine name in the edit field next to it. This machine name can be any machine running the DataGateway Server which is visible to your client machine. When the machine name is valid, and the Remote button is selected, JBuilder will build an URL for every BDE alias defined on the machine you specified. This gives instant connectivity to all BDE drivers running on another machine and provides a powerful middle tier between client and server machines.
The following figure shows an overview of the DataGateway architecture.
DataGateway architecture overview
A Java application or applet makes JDBC calls through the DataGateway Client, and the Client connects to a Windows 95 or Windows NT server through the TCP/IP protocol.
The server has the DataGateway Server, the DataGateway Bridge, and the Borland Database Engine (BDE) installed, as well as valid BDE aliases for the data sources requested by the Java application or applet. The DataGateway Server manages the Client requests and passes the information on to the bridge. The bridge converts the JDBC calls to BDE calls, and then passes these calls to the BDE.
The BDE then queries the data source specified by the Java application or applet. If the data source is a local database such as dBASE or Paradox, the BDE uses its local drivers to retrieve the data from the database.
If the data source specified by the Java application or applet is an SQL database, the BDE uses SQL Links to connect to the specified database and retrieves the data. The data is passed back to the bridge for conversion back to JDBC, and is then returned via the Server to the Client. The Client then passes the returned data back to the Java application or applet.
As an all-Java JDBC driver for InterBase, InterClient enables platform-independent, client/server development for the Internet and corporate Intranets. The advantage of an all-Java driver versus a native-code driver is that you can deploy InterClient-based applets without having to manually load platform-specific JDBC drivers on each client system (the Web servers automatically download the InterClient classes along with the applets). Therefore, there's no need to manage local native database libraries, which simplifies administration and maintenance of customer applications. As part of a Java applet, InterClient can be dynamically updated, further reducing the cost of application deployment and maintenance.
After installing JBuilder, run install.exe from the JBuilder CD, and select InterClient. Accept defaults, as appropriate. After installing InterClient, be sure to add it to JBuilder's IDECLASSPATH and CLASSPATH, as described in InterClient's readme.txt and jbuilder_notes.txt files.
InterClient allows Java applets and applications to:
The primary audience for InterClient is developers who wish to create Java-based client-server applications. Java developers should be able to seamlessly swap RDBMS back-ends underneath their JDBC applications. InterClient provides a small footprint, easy to maintain RDBMS (InterBase) as the back end to JDBC applications. An InterBase back end is an ideal solution because it's small, economical, and conforms to the same SQL standards as the JDBC.
InterBase developers who are writing new Java-based client programs can use InterClient to access their existing InterBase databases. Because InterClient is an all-Java driver, it can also be used on Sun's new NC (Network Computer), a desktop machine that runs applets. The NC has no hard drive or CD ROM; users access all of their applications and data via applets down loaded from servers.
The following figure shows the InterClient Architecture:
InterClient consists of two major pieces: