This section explains how to build a driver written in Java on Windows platforms.
You can use the sample projects from the 5 Day Guides as an example of how to build your own custom driver. For a step-by-step example on how to build the sample projects, see the 5 Day Guides at http://www.simba.com/resources/sdk/documentation/.
As explained in Implementation Options , you can write a custom ODBC or JDBC driver in Java using the following methods:
This option can be implemented with or without the C++ Simba SQLEngine.
This option can be implemented with or without the Java Simba SQLEngine.
The compilation instructions for these two methods are described below.
This type of driver can optionally use the Java SQL Engine. You can use it with or without the Java Simba SQLEngine.
The following steps describe how to build a pure-Java JDBC driver that does not use the SQL Engine:
The JavaUltraLight sample driver shows how to implement and build this type of driver.
To build a pure-Java JDBC driver that uses the Java SQL engine, follow the steps in Building a JDBC Driver for SQL-Capable Data Stores above, and also include the
SimbaSQLEngine.jar in your build process.
The JavaQuickJson sample driver shows how to implement and build this type of driver. In this sample driver, the ANT build script packages the pre-compiled files with those of the DSII.
This type of driver uses a JNI bridge to connect to the C++ API components. You can use it with or without the C++ Simba SQLEngine.
The following steps describe how to build an ODBC driver that doesn't use the SQL Engine and is not built for client-server deployments:
Configuration Properties -> Linker-> General-> Additional Library Directories
JAVA_HOME is an environment variable that should refer to the 32-bit Java installation directory when building the 32-bit ODBC driver or the 64-bit Java installation directory when building the 64-bit ODBC driver.
Configuration Properties -> Linker-> Input-> Additional Dependencies
Set ConfigurationName to one of the following values:
Release_MTDLL. For information on these options, see Run-time library options.
Configuration Properties -> C/C++-> General-> Additional Include Directories:
The sample drivers discussed in the document Build a Java ODBC Driver in 5 Days are configured to build as Windows DLL’s.
To build a driver as a stand-alone SimbaServer executable, follow the steps in Building as an ODBC Driver (a DLL) for Local Connections with the additional C++ settings described in Build as a SimbaServer (an EXE) for Remote Connections.
To build a Java ODBC driver that uses the C++ SQL engine, follow the steps in Build as an ODBC Driver (a DLL) for Local Connections above with the additional SQL Engine settings described in Build with the SQL Engine.
The JavaQuickstart sample driver shows how to implement and build this type of driver.