CUBRID ODBC Driver Installation Instructions


If you want to use CUBRID as a data source for your Windows applications using the ODBC Driver, you should read this article. In this tutorial you will learn how to set up the CUBRID ODBC Driver. There is no need to separately download the driver, because it comes by default with the CUBRID Installation. Thus, this tutorial assumes you have already installed CUBRID on your Windows. Follow the steps described below to set it up and start using it.

However, if you still wish to separately download the ODBC driver, perhaps, for remote connection when CUBRID is not installed on your machine, you can download it from http://www.cubrid.org/?mid=downloads&item=odbc_driver&os=windows.

Configuration

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.

Windows Administrative Tools

Double click on the Data Sources (ODBC) to open it. Then 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.

ODBC Drivers

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.
  • 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 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.

    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.

To start the database called demodb, type in the command line terminal cubrid server start demodb.

Trackback '1'

CUBRID ODBC Tutorials

Installation Instructions [CUBRID ODBC Driver Installation Instructions] Guides and Tutorials CUBRID ODBC Programming ODBC Administrator tool on 64-bit Windows [C...

3 months ago

Page info
viewed 1221 times
translations en
Author
posted 9 months ago by
hellohuizhang
Contributors
updated 4 weeks ago by
View revisions
Share this article