The SDBC Driver for JDBC

From Apache OpenOffice Wiki
Jump to: navigation, search

The SDBC driver for JDBC is a mapping from SDBC API calls to the JDBC API, and vice versa. Basically, this driver is a direct bridge to JDBC. The SDBC driver for JDBC requires a special property called JavaDriverClass to know which JDBC driver should be used. The expected value of this property should be the complete class name of the JDBC driver. The following code snippet uses a MySQL JDBC driver to connect.

  // first create the needed url
  String url = "jdbc:mysql://localhost:3306/TestTables";
  // second create the necessary properties [] props = new[] {
      new []("user", 0, "test1", 
      new"password", 0, "test1",
      new"JavaDriverClass", 0, "",

  // now create a connection to adabas
  xConnection = xDriverManager.getConnectionWithInfo(url, props);

Other properties that require setting during the connect process depend on the JDBC driver that is used.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages