Visual Studio Windows DataGrid Form Application
This article details the steps required to create a simple Visual Studio 2008 Windows Form application, with associated
1.
Launch the Visual Studio 2008 SP1 IDE.
2.
Create a Web Application project by going to the File menu in Visual Studio and choosing New Project.
3.
When the New Project window appears, choose either Visual Basic or Visual C# as your programming language.
4.
Within the language category click on Windows and select Windows Form Application from the right-hand panel.
5.
Choose a name for the project, for example
6.
In the Toolbox, expand Data Controls and drag the
7.
Click on the little arrow on the top right of the
8.
Click on the Choose Data Source list box.
9.
Click on the Add Project Data Source link to connect to a data source.
10.
In the Data Source Configuration Wizard dialog Choose Data Source Type page, select the Database data source type and click Next.
11.
In the Data Source Configuration Wizard dialog Choose your Data Connection page, select the New Connection button.
12.
In the Choose Data Source dialog, select the
13.
In the Connection Properties dialog specify the hostname, portno, username, and password for the target Virtuoso Server and click the Advanced button.
14.
In the Advanced Properties dialog, set the Database parameter to TUT and click OK.
15.
Press the Test Connection dialog to verify the database is accessible.
16.
Leave the name of the connect string to the default of
17.
From the list of available tables returned for the TUT database, select the cust_orders table to be associated with the
18.
The column names of the select table will be displayed in the the
19.
Resize the Form and
20.
To test the application, simply hit Ctrl+F5 within Visual Studio or select Start Debugging from the Debug menu.
21.
The data from the cust_orders table will be displayed in the
The task is now complete.
Referenced by...