Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.3 |  CUBRID 9.0.0 | 

JDBC Overview

CUBRID JDBC driver (cubrid_jdbc.jar) implements an interface to enable access from applications in Java to CUBRID database server. CUBRID JDBC driver is installed in the <directory where CUBRID is installed>/jdbc directory. The driver has been developed based on the JDBC 2.0 specification and the default driver provided is complied with JDK 1.6.

To download JDBC driver or get the latest information, click http://www.cubrid.org/wiki_apis/entry/cubrid-jdbc-driver.

Verifying CUBRID JDBC Driver Version

You can verify the version of JDBC driver 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/driver/CUBRIDBlob.class

...

CUBRID-JDBC-8.3.1.1032

Registering CUBRID JDBC Driver

Use the Class.forName(driver-class-name) command to register CUBRID JDBC driver. The following example shows how to load the cubrid.jdbc.driver.CUBRIDDriver class to register 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();

       }

       ...