JDBC1ConnectionURLFormat Connection URLs for Type 1 JDBC Driver Connection URLs for Type 1 JDBC Driver A Type 1 JDBC Driver connects ("bridges") JDBC client applications to ODBC Data Source Names (DSNs).Note 1: You should generally have only one of the following in your CLASSPATH environment variable. If you have multiple jars which use the same Classname, only the first found by the JVM (typically the first in your CLASSPATH) will be active. Choose the one best matched to your active JVM.Note 2: Our pure Type 3 JDBC Drivers, filenames megathin*.jar, cannot be used for Type 1 connections, and must not be included in your active CLASSPATH alongside opljdbc*.jar.Our Type 1 JDBC Drivers have the following attributes -- <tgroup><thead /><tbody> <row><entry> <emphasis>Java Version</emphasis> </entry><entry> <emphasis>Compatible JVM/JRE/JDK</emphasis> </entry><entry> <emphasis>JDBC Version</emphasis> </entry><entry> <emphasis>Filename</emphasis> </entry><entry> <emphasis>Classname</emphasis> </entry></row> <row><entry> Java 8 </entry><entry> 1.8.x </entry><entry> JDBC 4.2 </entry><entry> opljdbc4_2.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 7 </entry><entry> 1.7.x </entry><entry> JDBC 4.1 </entry><entry> opljdbc4_1.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 6 </entry><entry> 1.6.x </entry><entry> JDBC 4 </entry><entry> opljdbc4.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 4 and 5 </entry><entry> 1.4.x and 1.5.x </entry><entry> JDBC 3 </entry><entry> opljdbc3.jar </entry><entry> openlink.jdbc3.Driver </entry></row> <row><entry> Java 2 and 3 </entry><entry> 1.2.x and 1.3.x </entry><entry> JDBC 2 </entry><entry> opljdbc2.jar </entry><entry> openlink.jdbc2.Driver </entry></row> <row><entry> Java 1 </entry><entry> 1.1.x </entry><entry> JDBC 1 </entry><entry> opljdbc.jar </entry><entry> openlink.jdbc.Driver </entry></row> </tbody></tgroup></table> <para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Type 1 JDBC URL Syntax </bridgehead> <para>Our Type 1 JDBC URL sytax is as follows: </para><programlisting>jdbc:openlink://ODBC[/DSN=dsn][/UID=uid][/PWD=pwd][/READONLY=x] </programlisting><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Type 1 JDBC URL Attributes </bridgehead> <itemizedlist mark="bullet" spacing="compact"><listitem> <emphasis><computeroutput>/DSN</computeroutput></emphasis> -- ODBC Data Source Name </listitem> <listitem> <emphasis><computeroutput>/UID</computeroutput></emphasis> -- Username </listitem> <listitem> <emphasis><computeroutput>/PWD</computeroutput></emphasis> -- Password </listitem> <listitem> <emphasis><computeroutput>/READONLY</computeroutput></emphasis> -- Determines session mode, read-write (<computeroutput>=N</computeroutput>) or read-only (<computeroutput>=Y</computeroutput>).</listitem> </itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example </bridgehead> <para>To connect to an ODBC DSN on your machine named "<ulink url="CustomerDatabase">CustomerDatabase</ulink>" in read-only mode, you could use the following JDBC URL: </para><programlisting>jdbc:openlink://ODBC/DSN=CustomerDatabase/UID=test/PWD=test/READONLY=Y </programlisting><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2"> <emphasis>Important Note</emphasis> </bridgehead> <para><emphasis>The connect string syntax below uses the proof-of-concept JDBC-to-ODBC bridge which was bundled into Java 1 through 7, and dropped in Java 8.</emphasis></para><para><emphasis>This syntax should not be used.</emphasis> </para><programlisting>jdbc:odbc:<dsn>;UID=<uid>;PWD=<pwd> </programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h2"> See Also </bridgehead> <itemizedlist mark="bullet" spacing="compact"><listitem> <ulink url="JDBC3ConnectionURLFormat">Connection URLs for Type 3 JDBC Driver</ulink></listitem> </itemizedlist></section></docbook>