Development: JDBC Interface

Overview

The Omnidex JDBC Driver is a standard-compliant JDBC driver that provides Java access to Omnidex Environments. The Omnidex JDBC Driver is supported on Microsoft Windows and Linux operating systems.

The Omnidex JDBC Classes

The Omnidex JDBC class files are stored in a jar file named Omnidex.jar, which is located in the bin subdirectory of the Omnidex home directory on a Microsoft Windows computer (%OMNIDEX_HOME%/bin/Omnidex.jar), or the lib directory on a Linux computer ($OMNIDEX_HOME/lib/Omnidex.jar).

JDBC classes require that you import java.sql into the Java application.

import java.sql.*;

The Omnidex JDBC driver requires that you load it using the following statement.

Class.forName("omnidex.jdbc.OdxJDBCDriver");

Connecting to an Omnidex Environment

Connecting to an Omnidex Environment File in JDBC simply requires referencing the Omnidex connection string in the call to DriverManager.getConnection:

Connection conn = 
  DriverManager.getConnection( "jdbc:omnidex:[server1:7555]C:\\class\\simple.xml");

It is also possible to reference a File DSN in the call to DriverManager.getConnection. File DSN's are typically used with ODBC applications, but can be useful for externalizing the connection string. Consult the ODBC File DSN Syntax Specification for instructions to build a File Datasource.

Connection conn = 
  DriverManager.getConnection( "jdbc:omnidex:simple.dsn");

Additional Resources

 
Back to top
dev/jdbc/home.txt ยท Last modified: 2016/06/28 22:38 (external edit)
 
 
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0