Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtFirebirdVisualStudioDataGridFormsApp
|
maker
| |
Title
| - VirtFirebirdVisualStudioDataGridFormsApp
|
isDescribedUsing
| |
has creator
| |
attachment
| |
content
| - %META:TOPICPARENT{name="VirtFirebirdEntityFrameworkUsage"}%
---++ Virtuoso ADO.Net Data Grid Form Application
This article details the steps required to create a simple Visual Studio 2008 Windows Form application with associated 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%/VirtFirebirdDataGrid_01.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>.
1 When the New Project window appears, choose either <b>Visual Basic</b> or <b>Visual C#</b> as the programming language.
1 Within the language category, click on <b>Windows</b> and select <b>Windows Form Application</b> from the right-hand panel.
1 Choose a name for the project, for example <b><nop>VirtuosoDataGridApp</b>, and click <b>OK</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_02.png" style="wikiautogen"/>%BR%%BR%
1 From the <b>Data</b>, menu select the <b>Show Data Sources</b> menu item to display a list of available Data sources.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_03.png" style="wikiautogen"/>%BR%%BR%
1 Click on the <b>Add New Data Source</b> link to add a new data source.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_04.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%/VirtFirebirdDataGrid_05.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Data Source Configuration Wizard</b> dialog <b>Choose your Data Connection page</b>, select the <b>New Connection button</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_06.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Choose Data Source</b> dialog, select <b><nop>OpenLink Virtuoso Data Source</b> from the list and click <b>Continue</b>.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_07.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Add Connection</b> dialog, specify the <b>hostname</b>, <b>portno</b>, <b>username</b>, and <b>password</b> for the target Virtuoso Server and and check the <b>Save Password</b> check box.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_08.png" style="wikiautogen"/>%BR%%BR%
1 Select the <b>Select Database From List</b> radio button and choose <b>employee</b> from the drop down list, assuming the Virtuoso Demo Database is installed.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_09.png" style="wikiautogen"/>%BR%%BR%
1 Click the <b>Test Connection</b> button to verify the connection is successful and then click <b>OK</b> to add the connection.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_10.png" style="wikiautogen"/>%BR%%BR%
1 Select the <b>Yes, include sensitive data in the connect string</b> radio button and click <b>Next</b> to continue.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_11.png" style="wikiautogen"/>%BR%%BR%
1 In the <b>Choose your Database Objects</b> dialog select the table and columns to be queried, the <b>COUNTRY</b> table is used in this example.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_12.png" style="wikiautogen"/>%BR%%BR%
1 A DataSet for the <b>employee</b> database object is created
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_13.png" style="wikiautogen"/>%BR%%BR%
1 From the drop down list box next to the <b>COUNTRY</b> table ensure the <b><nop>DataGridView</b> item is selected
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_14.png" style="wikiautogen"/>%BR%%BR%
1 Drag the <b>COUNTRY</b> DataSet item onto the <b>Form</b> to create a scrollable and editable association of the <b>COUNTRY</b> table object with the Data Grid View automatically.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_15.png" style="wikiautogen"/>%BR%%BR%
1 From the <b>Debug Menu</b> select the <b>Start Debugging</b> menu item to run the application.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_16.png" style="wikiautogen"/>%BR%%BR%
1 The data in the <b>COUNTRY</b> table will be displayed in the <nop>DataGrid application created.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_17.png" style="wikiautogen"/>%BR%%BR%
1 A new row can be inserted (updated or deleted) as indicated for the new "1111" record inserted below and the <b>Save</b> button clicked to save the change to the database.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_18.png" style="wikiautogen"/>%BR%%BR%
1 The Virtuoso <b>Interactive SQL</b> tab of the Conductor can be used to run the query <b>select * from "employee"."fire"."COUNTRY"</b>
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_19.png" style="wikiautogen"/>%BR%%BR%
1 To verify the change has been successfully made in the database.
%BR%%BR%<img src="%ATTACHURLPATH%/VirtFirebirdDataGrid_20.png" style="wikiautogen"/>%BR%%BR%
The task is now complete.
|
id
| - ca2e6582c1d4408a09b18601bb0dcab0
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtFirebirdVisualStudioDataGridFormsApp
|
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 | |