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:This Tutorial is only available for cubrid-odbc-8.4.0 or older versions. CUBRID ODBC installation used to have a problem on 64 bit OS so we have offered a new installation package available for both 32bit and 64 bit OS since 2013-05. If your CUBRID DB Engine is running on 64 bit OS, please choose a new installation package by following : http://www.cubrid.org/wiki_apis/entry/cubrid-odbc-driver-installation-instructions

Configuration

Open Data Sources on Windows 32-bit

On you PC, first open the Control Panel => Administrative Tools. You should see a list of tools available on your Windows OS as shown below.

Double click on the Data Sources (ODBC) to open it.

OPEN DATA SOURCES ON WINDOWS 64-BIT

If you are using 64-bit Windows, you should not launch Data Sources (ODBC) as shown above as it will start 64-bit version of Data Sources (ODBC) program. Since CUBRID ODBC driver is available only in 32-bit version, we need to start 32-bit version of Data Sources (ODBC) which is located in c:\Windows\System32\odbcad32.exe. Make sure you start this one.

Create new data source

Once you started the 32-bit version of Data Sources (ODBC), navigate to the Drivers tab and make sure the CUBRID Driver is available as shown below, which will mean that it has been successfully installed on your system.

Then navigate back to the User DSN tab and click on the Add button.

In the pop-up window choose the CUBRID Driver and click the Finish button.

Fill out the fields with the necessary data as shown in the image below.

DSN: Give a desired name to this data source (eg. your database name).

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 see broker1 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.

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.

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.