home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / TRIAL / INTRCLNT / DATA.Z / JBuilderNotes.txt < prev    next >
Encoding:
Text File  |  1997-11-14  |  3.4 KB  |  96 lines

  1. JBuilder Integration Notes
  2. InterBase InterClient 1.12
  3. Last modified: Nov 6, 1997
  4.  
  5. Contents:
  6.      I.  Setting JBuilder's CLASSPATH and IDECLASSPATH
  7.     II.  Using borland.sql.dataset
  8.  
  9. __________________________________________________________________
  10. Setting JBuilder's CLASSPATH and IDECLASSPATH
  11.  
  12. The InterClient installation automatically appends InterClient
  13. to both CLASSPATH and IDECLASSPATH in the JBuilder.INI file.
  14. JBuilder.INI is located in JBuilder's bin directory.
  15.  
  16. If JBuilder is installed after InterClient, then you must
  17. modify JBuilder.INI manually.  Include interclient.jar
  18. from the InterClient root directory in your JBuilder CLASSPATH
  19. and IDECLASSPATH.  For example, in the file JBuilder.INI, modify
  20.  
  21. CLASSPATH=c:\Program Files\InterBase Corp\InterClient\interclient.jar;...
  22. IDECLASSPATH=c:\Program Files\InterBase Corp\InterClient\interclient.jar;...
  23.  
  24. where ... is the existing JBuilder paths for these variables.
  25.  
  26. Any changes made to JBuilder.INI must be made while JBuilder is 
  27. not running.
  28.  
  29. The JBuilder CLASSPATH variable that occurs in JBuilder.INI is
  30. not related to the CLASSPATH variable set by users of Sun's JDK.
  31.  
  32. Uninstalling InterClient will not remove InterClient from the
  33. CLASSPATH and IDECLASSPATH in the JBuilder.INI file.  This will
  34. need to be removed manually.
  35.  
  36. __________________________________________________________________
  37. Using borland.sql.dataset
  38.  
  39. This section used to be called "Using borland.jbcl.dataset".
  40. JDBC-specific classes in borland.jbcl.dataset have been moved to 
  41. a new package, borland.sq.dataset.  See JBuilder's README for
  42. incompatibilities with JBuilder 1.0.
  43.  
  44. Here is how to establish a database connection with the dataset package
  45. that comes with JBuilder Professional and JBuilder Client/Server.
  46.  
  47.   import borland.sql.dataset.*;
  48.  
  49.   Database database = null;
  50.   QueryDataSet queryDataSet = null;
  51.   try {
  52.     database = new Database ();
  53.     database.setConnection (
  54.       new ConnectionDescriptor (
  55.         "jdbc:interbase://server//databases/employee.gdb",
  56.         "SYSDBA",
  57.         "masterkey", 
  58.         false, 
  59.         "interbase.interclient.Driver"));
  60.     queryDataSet = new QueryDataSet ();
  61.     queryDataSet.setQuery (
  62.       new QueryDescriptor (
  63.         database, 
  64.         "select * from employee", 
  65.         null, 
  66.         true, 
  67.         false));
  68.   }
  69.   catch (DataSetException e) {
  70.     e.printStackTrace ();
  71.   }
  72.  
  73. Depending on your version of JBuilder, the Database, QueryDataSet, 
  74. QueryDescriptor, and ConnectionDescriptor classes may reside in 
  75. either the borland.sql.dataset package or the borland.jbcl.dataset
  76. package.  If the code above produces the error 
  77.  
  78.   "cannot access directory borland/sql" 
  79.  
  80. with your version of JBuilder Professional, then change all
  81. borland.sql.dataset references to borland.jbcl.dataset.  
  82. For more information, see the JBuilder Programmer's Guide, Chapter 5.
  83.  
  84. You may wish to enable a JDBC trace monitor as follows:
  85.  
  86.   interbase.interclient.Driver registeredDriver = 
  87.     (interbase.interclient.Driver) DriverManager.getDriver ("jdbc:interbase:");
  88.   interbase.interclient.Monitor monitor = registeredDriver.getMonitor ();
  89.   monitor.enableAllTraces (true);
  90.   monitor.setTraceStream (System.out);
  91.  
  92. For more detailed information, see the InterClient API documentation for
  93. interbase.interclient.Driver and interbase.interclient.Monitor classes.
  94.  
  95. ________________________________END_______________________________
  96.