Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

Creating a simple CUBRID .NET WinForms application


In this section, we will see how the OLE DB data provider can be used from .NET, through the features implemented in the System.Data.OleDb namespace.

The first thing we will do is to create a new Windows Forms Application project, using the default settings:

New_Form.png 

Let’s add create a CUBRID OLE DB connection in the Server Explorer. Expand Server Explorer window, select Data Connections, right-click and Add Connection:

Choose_Data_Source.png

Enter the CUBRID connection information: server, database, port, user, and password:

Advanced_Properties.png

When you are done entering the connection information, click Test Connection, to make sure everything is ok and you can connect successfully to the database:

Test_Connection.png

Now you will be able to browse the CUBRID demodb database from the Visual Studio Server Explorer window:

demodb_schema.png

Note: Creating a CUBRID Connection in the Server Explorer is not a mandatory step; however, we recommend doing this because it provides additional advantages during development, like validating the CUBRID connection, easy browsing the database structure, testing your SQL queries etc.

Now let’s create a simple table data browser, for the historytable in the demodb database. Select Toolbox/Data/DataGridView and drag-drop it onto your form. You will be prompted to create a new DataSet/Data Source that will be associated with the DataGridView control:

data_source_configuration_wizard.png

choose_database_model.png

choose_data_connection.png

choose_database_objects.png

Once we have created the DataSet, let’s choose the proper data source for the history table:

Form1.png

One last step -Run (F5 or Ctrl-F5). The application window will display the data from the history table:

Sample_Output.png

...You have just created your first CUBRID .NET application using the CUBRID OLE DB Data Provider!

comments powered by Disqus
문서 정보
viewed 1937 times
번역 en
작성자
posted 2년 전
CUBRID
공헌자
마지막 수정시간 2년 전
변경 내역 보기
Share this article