Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtODBCVisualStudioDataGridFormsApp
|
maker
| |
Title
| - VirtODBCVisualStudioDataGridFormsApp
|
isDescribedUsing
| |
has creator
| |
attachment
| |
content
| - %VOSWARNING%
%META:TOPICPARENT{name="VirtODBCEntityFrameworkUsage"}%
---+++Visual Studio Windows <nop>DataGrid Form Application
This article details the steps required to create a simple Visual Studio 2008 Windows Form application, with associated <nop>DataGridView control for displaying data in selected tables from the target database.
1 Launch the Visual Studio 2008 SP1 IDE.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp01.png" style="wikiautogen"/>%BR%%BR%
1 Create a <b>Web Application</b> project by going to the <b>File</b> menu in Visual Studio and choosing <b>New Project</b>. %BR%%BR%
1 When the New Project window appears, choose either <b>Visual Basic</b> or <b>Visual C#</b> as your programming language.%BR%%BR%
1 Within the language category, click on <b>Windows</b> and select <b>Windows Form Application</b> from the right-hand panel. %BR%%BR%
1 Choose a name for the project, for example <b><nop>VirtWindowsFormApplication</b>, and click <b>OK</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp02.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Toolbox</b>, expand <b>Data</b> Controls and drag the <b><nop>DataGridView</b> control onto the form.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp03.png" style="wikiautogen"/>%BR%%BR%
1 Click on the little <b>arrow</b> in the top right of the <b><nop>DataGridView</b> control to load the <b><nop>DataGridView Task</b> menu.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp04.png" style="wikiautogen"/>%BR%%BR%
1 Click on the <b>Choose Data Source</b> list box.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp05.png" style="wikiautogen"/>%BR%%BR%
1 Click on the <b>Add Project Data Source</b> link to connect to a data source.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp06.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Data Source Configuration Wizard</b> dialog <b>Choose Data Source Type</b> page, select the <b>Database</b> data source type and click <b>Next</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp07.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Data Source Configuration Wizard</b> dialog <b>Choose your Data Connection</b> page, select the <b>New Connection</b> button.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp08.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Choose Data Source</b> dialog, select the <b><nop>OpenLink Virtuoso Data Source</b> from the list and click <b>Continue</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp09.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Connection Properties</b> dialog, specify the <b>hostname</b>, <b>portno</b>, <b>username</b> and password for the target Virtuoso Server.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtDataGridApp10.png" style="wikiautogen"/>%BR%%BR%
1 Select the <b>Select Database From List</b> radio button and choose the <b>NWIND</b> database from the list available.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp1.png" style="wikiautogen"/>%BR%%BR%
1 Press the <b>Test Connection</b> dialog to verify that the database is accessible.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp2.png" style="wikiautogen"/>%BR%%BR%
1 Leave the default connect string name — <b><code><nowiki>NWINDConnectionString</nowiki></code></b> — and click <b>Next</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp3.png" style="wikiautogen"/>%BR%%BR%
1 From the list of available tables returned for the NWIND database, select the <b>Products</b> table to be associated with the <b><nop>DataGridView</b> control.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp4.png" style="wikiautogen"/>%BR%%BR%
1 The column names of the selected table will be displayed in the the <nop>DataGridView.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp5.png" style="wikiautogen"/>%BR%%BR%
1 Resize the form and <nop>DataGridView to allow all columns to be visible, if possible.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp6.png" style="wikiautogen"/>%BR%%BR%
1 To test the application, simply hit <b>ctrl+F5</b> within Visual Studio or select <b>Start Debugging</b> from the <b>Debug</b> menu.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp7.png" style="wikiautogen"/>%BR%%BR%
1 The data from the <b>Products</b> table will be displayed in the <b><nop>DataGrid</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtODBCDataGridApp8.png" style="wikiautogen"/>%BR%%BR%
The task is now complete.
CategoryDocumentation CategoryVirtuoso CategoryEntityFramework CategoryDotNET CategoryODBC CategoryODBCODBCBridge
|
id
| - fe3c6b7e83adad41ddeb89dec67d961e
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtODBCVisualStudioDataGridFormsApp
|
links to
| |
atom:source
| |
atom:author
| |
atom:published
| |
atom:updated
| |
topic
| |
is made
of | |
is container of
of | |
is link
of | |
is http://rdfs.org/si...vices#services_of
of | |
is links to
of | |
is creator of
of | |
is atom:entry
of | |
is atom:contains
of | |