Open Source RDBMS - Seamless, Scalable, Stable and Free

English | 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
문서 정보
viewed 958 times
번역 en
posted 작년
마지막 수정시간 작년
변경 내역 보기
Share this article