Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 



CUBRID JDBC Driver

The CUBRID JDBC driver (cubrid_jdbc.jar) enables the system to make a connection to the CUBRID database in an application written in Java. The driver is located in the "location of CUBRID installed/jdbc" directory.

The CUBRID JDBC driver has been developed based on the JDBC 2.0 specification and provides compilation output generated in JDK version 1.6.

Checking the CUBRID JDBC Driver Version

You can check the JDBC driver version as follows:

% jar -tf cubrid_jdbc.jar

META-INF/ META-INF/MANIFEST.MF

cubrid/ cubrid/jdbc/

cubrid/jdbc/driver/

cubrid/jdbc/jci/

cubrid/sql/

CUBRID-JDBC-8.1.4.1032

cubrid/jdbc/driver/CUBRIDBlob.class

...

Registering the CUBRID JDBC Driver

Use the Class.forName (driver-class-name) command to register the JDBC driver. The following example shows how to load the cubrid.jdbc.driver.CUBRIDDriver class to register the CUBRID JDBC driver.

import java.sql.*;

import cubrid.jdbc.driver.*;

 

public class LoadDriver {

   public static void main(String[] Args) {

       try {

           Class.forName("cubrid.jdbc.driver.CUBRIDDriver");

       } catch (Exception e) {

           System.err.println("Unable to load driver.");

           e.printStackTrace();

       }

       ...