Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

How to use the CUBRID ADO.NET Data Provider?

Create a new project

Open Microsoft 2008, select File->New->Project…. In the new project dialog, select Other Languages-> Visual C# and project type is Console Application. Input project name: Sample, press OK.


Add Refernces

In solution explorer, right click on the References, in the pop-up menu, select Add Reference….

Add References.png

In the popup dialog select Browser page, open the CUBRID ADO.NET Data Provider installation directory, and select CUBRID.Data.dll.


How to connect to CUBRID Database server?

Use CUBRIDConnection class to connect to the database server. In the source file add following code:

using CUBRID.Data.CUBRIDClient;

C# Sample

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Common;
using CUBRID.Data.CUBRIDClient;
namespace Sample
    class DBTest
        static readonly string _connString = "server=;database=demodb;port=33000;user=public;password=";
         * Connect to CUBRID DB server
        public void ConnectDB()
            /* create a new CUBRIDConnection instance */
            using (CUBRIDConnection conn = new CUBRIDConnection())
                    /* set the connection string */
                    conn.ConnectionString = _connString;
                    /* connect to db server */
                catch (Exception exp)
comments powered by Disqus
Page info
viewed 2208 times
translations en
posted 2 years ago by
updated 2 years ago by
View revisions
Share this article