home *** CD-ROM | disk | FTP | other *** search
- JBuilder Integration Notes
- InterBase InterClient 1.12
- Last modified: Nov 6, 1997
-
- Contents:
- I. Setting JBuilder's CLASSPATH and IDECLASSPATH
- II. Using borland.sql.dataset
-
- __________________________________________________________________
- Setting JBuilder's CLASSPATH and IDECLASSPATH
-
- The InterClient installation automatically appends InterClient
- to both CLASSPATH and IDECLASSPATH in the JBuilder.INI file.
- JBuilder.INI is located in JBuilder's bin directory.
-
- If JBuilder is installed after InterClient, then you must
- modify JBuilder.INI manually. Include interclient.jar
- from the InterClient root directory in your JBuilder CLASSPATH
- and IDECLASSPATH. For example, in the file JBuilder.INI, modify
-
- CLASSPATH=c:\Program Files\InterBase Corp\InterClient\interclient.jar;...
- IDECLASSPATH=c:\Program Files\InterBase Corp\InterClient\interclient.jar;...
-
- where ... is the existing JBuilder paths for these variables.
-
- Any changes made to JBuilder.INI must be made while JBuilder is
- not running.
-
- The JBuilder CLASSPATH variable that occurs in JBuilder.INI is
- not related to the CLASSPATH variable set by users of Sun's JDK.
-
- Uninstalling InterClient will not remove InterClient from the
- CLASSPATH and IDECLASSPATH in the JBuilder.INI file. This will
- need to be removed manually.
-
- __________________________________________________________________
- Using borland.sql.dataset
-
- This section used to be called "Using borland.jbcl.dataset".
- JDBC-specific classes in borland.jbcl.dataset have been moved to
- a new package, borland.sq.dataset. See JBuilder's README for
- incompatibilities with JBuilder 1.0.
-
- Here is how to establish a database connection with the dataset package
- that comes with JBuilder Professional and JBuilder Client/Server.
-
- import borland.sql.dataset.*;
-
- Database database = null;
- QueryDataSet queryDataSet = null;
- try {
- database = new Database ();
- database.setConnection (
- new ConnectionDescriptor (
- "jdbc:interbase://server//databases/employee.gdb",
- "SYSDBA",
- "masterkey",
- false,
- "interbase.interclient.Driver"));
- queryDataSet = new QueryDataSet ();
- queryDataSet.setQuery (
- new QueryDescriptor (
- database,
- "select * from employee",
- null,
- true,
- false));
- }
- catch (DataSetException e) {
- e.printStackTrace ();
- }
-
- Depending on your version of JBuilder, the Database, QueryDataSet,
- QueryDescriptor, and ConnectionDescriptor classes may reside in
- either the borland.sql.dataset package or the borland.jbcl.dataset
- package. If the code above produces the error
-
- "cannot access directory borland/sql"
-
- with your version of JBuilder Professional, then change all
- borland.sql.dataset references to borland.jbcl.dataset.
- For more information, see the JBuilder Programmer's Guide, Chapter 5.
-
- You may wish to enable a JDBC trace monitor as follows:
-
- interbase.interclient.Driver registeredDriver =
- (interbase.interclient.Driver) DriverManager.getDriver ("jdbc:interbase:");
- interbase.interclient.Monitor monitor = registeredDriver.getMonitor ();
- monitor.enableAllTraces (true);
- monitor.setTraceStream (System.out);
-
- For more detailed information, see the InterClient API documentation for
- interbase.interclient.Driver and interbase.interclient.Monitor classes.
-
- ________________________________END_______________________________
-