Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

CUBRID ODBC Driver Installation Instructions


If you want to use CUBRID as a data source for your Windows applications using the ODBC Driver, this article will help you achieve this.
Notice: If your CUBRID ODBC Driver version is 9.1.0.p1 or later, only one installation package is needed for both Windows 32 bit and 64 bit. Our new ODBC installer supports CUBRID DB engine 8.4.1 or later.
If your CUBRID ODBC Driver version is 9.1.0 or older, it may have a problem on 64 bit operating system. Please see our installation tutorial for an old version: http://www.cubrid.org/wiki_apis/entry/cubrid-odbc-driver-installation-instructions-old

Download

Download a new installation package file which name is "cubrid-odbc-<version>-win32-x64.zip".
It will install both cubrid_odbc32.dll and cubrid_odbc64.dll at once. You can find a CUBRId ODBC inataller at:

http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/ or
http://www.cubrid.org/?mid=downloads&item=odbc_driver

Driver Installation

Run a CUBRID ODBC Installer (exe) and click the Next / Install Button.
image003.jpg
In your installation directory, you can see the following DLL files and uninstall. exe.
image005.jpg

Configuration

On your PC, first open the Control Panel => Administrative Tools. You should see a list of tools available on your Windows OS as shown below.
Windows Administrative Tools
Double click on the Data Sources (ODBC) to open it.

OPEN DATA SOURCES ON WINDOWS 64-BIT

If your driver version is 9.1.0.p1 or later, you should launch Data Sources (ODBC) as shown above as it will start 64-bit version of Data Sources (ODBC) program, otherwise you need to start 32-bit version of Data Sources (ODBC) which is located in C:\Windows\SysWOW64\odbcad32.exe. Make sure you start this one. SysWOW64 means Windows 32-bits on Windows 64-bit.

Create new data source

image007.PNG
Then navigate back to the User DSN tab and click on the Add button.
Add User Data Source Name
In the pop-up window choose the CUBRID Driver and click the Finish button.
Create New Data Source
Fill out the fields with the necessary data as shown in the image below.
CUBRID ODBC Data Source Name Config
  • DSN: Give a desired name to this data source (eg. your database name).
  • Description: Enter the description for this data source.
  • DB Name: Enter the target database name.
  • DB User: Database user name.
  • Password: Database user password.
  • Server Address: Database host address (localhost). You can also enter the remote server's IP address.
  • Server Port: CUBRID Broker's port number. The default port is 33000.
    You can check this in your command line terminal. Type cubrid service status. In the output you will seebroker1 in the first column and the port number in the third. You will notice that the broker uses the default port number 33000. If set otherwise, enter that port number into this field.
    CUBRID Service Status
    Another way to find the Broker port number is in the Broker's configuration file located at%CUBRID%confcubrid_broker.conf. See the BROKER_PORT value.
  • FETCH_SIZE: Set the number of record to fetch from the database. 100 should be reasonable.
Once filled out, click OK button. You will see CUBRID among the User Data Sources as shown below.
ODBC User Data Sources

Connecting to a database directly without DSN

It is also possible to connect to the CUBRID database directly in the application source code indicating the connecting string. In this case, use the following connection string.
conn = "driver={CUBRID Driver};server=localhost;port=33000;uid=dba;pwd=;db_name=demodb;"

Before establishing a connection

Make sure that your database is started before you try to connect or link to a CUBRID database. Otherwise, you will receive an ODBC call failed error.
This is all you need to do in order to connect to a CUBRID database using the ODBC driver.

Install odbc server without using installer

1. Download odbc driver from ftp. http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/DLL
    Cubrid odbc driver of 32bit: cubrid_odbc32.dll
    Cubrid odbc driver of 64bit: cubrid_odbc64.dll
    Install script: install_odbc.reg
2. Open install_odbc.reg with text:
    Modify Variable “Driver” and “Setup”, its value should be the path of driver in system, for example:
    "Driver"="C:\\ODBC\\cubrid_odbc.dll"
    "Setup"="C:\\ODBC\\cubrid_odbc.dll"
3. Execute script: install_odbc.reg
4. If the driver doesn’t work, please check the registry
    Path: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\CUBRID Driver
    The script is executed successfully or not.

Install oledb server without using installer

32-bit systems
     Install:
         regsvr32 /s Path\CUBRIDProvider32.dll
     Uninstall:
        regsvr32 /s /u Path\CUBRIDProvider32dl
64-bit systems
    Install:
        regsvr32 /s Path\CUBRIDProvider64.dll
    Uninstall:
        regsvr32 /s /u Path\CUBRIDProvider64.dll
comments powered by Disqus
Page info
viewed 3153 times
translations en
Author
posted last year by
cd_interface
Contributors
updated last year by
View revisions
Share this article