Article ID: 313486 - View products that this article applies to.
This article was previously published under Q313486
This article has been archived. It is offered "as is" and will no longer be updated.
This article provides a roadmap to learn and to master the Microsoft Visual Studio .NET Visual Database Tools and typed DataSet classes.
Roadmap articles provide links to useful information, including online documentation, Microsoft Knowledge Base articles, and Microsoft white papers, to help you learn about a Microsoft product or technology. For additional information about ADO.NET technology roadmap articles, click the article number below to view the article in the Microsoft Knowledge Base:
313590For additional information about ADO.NET DataAdapter objects, click the article number below to view the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/313590/EN-US/ )INFO: Roadmap for ADO.NET
(https://support.microsoft.com/kb/313483/EN-US/ )INFO: Roadmap for ADO.NET DataAdapter Objects
There is some overlap and interaction between these two categories. For example, Server Explorer uses some editors, and you can drag a table from Server Explorer to a design surface to invoke code generators.
The main components of Server Explorer are as follows:
The connections are represented in a tree view. You can add connections to the Servers node or to the Data Connections node.
Server Explorer includes several editors for manipulating SQL Server. In the tree view, you can right-click the Data Connections node to create a new SQL Server database. You can right-click the Tables, the Views, the Stored Procedures, and the Database Diagrams nodes to create or to modify a table, a view, a stored procedure, or a database diagram respectively. You can also generate SQL script that you can run against a different server to re-create the database. Most of these functions, such as creating and modifying tables and stored procedures, are also available for Oracle databases.
You can use the Database Designer to edit database diagrams and create relationships by dragging fields from one table to another.
Database Designerback to the list of tools
You can use the Table Designer to create or to modify tables in the database. You can specify or modify field names, data types, constraints, and indexes, among other items.
For more information about the Table Designer, visit the following Microsoft Web site:
Table Designerback to the list of tools
Query and View Designer
The Query and View Designer is shared by other data components, such as the Command and DataAdapter components. You can use the Query and View Designer to design queries visually and to view the results of the query. In Server Explorer, when you create or edit a view in the DataAdapter Configuration Wizard, or when you edit the CommandText property of a Command or a DataAdapter component, the Query and View Designer is invoked to generate the SQL statement for you. The SQL generating code only quotes identifiers for Microsoft SQL Server, Microsoft Jet, and Oracle. If you use a different back-end database, the identifiers will be unquoted. This may pose a problem if your database contains non-standard table or field names. For example, the names contain a space or other non-alphanumeric character. To correct this problem, you must manually make changes to the SQL in the generated code. However, if you regenerate the SQL, the changes will be lost.
For more information about the Query and View Designer, visit the following Microsoft Web site:
Query and View Designerback to the list of tools
The SQL Editor is invoked when you create a stored procedure. The SQL Editor provides color-coding to your T-SQL and PL/SQL statement and bounds individual statements with a rectangle for clarity. Additionally, when you edit multistatement SQL script, you can right-click individual statements and use the Query and View Designer to visually compose or edit these statements.
For more information about the SQL Editor, visit the following Microsoft Web site:
SQL Editorback to the list of tools
Data Form Wizard
The Data Form Wizard is similar to the Form Wizard in Microsoft Access. With the Data Form Wizard, you can specify one or two tables on the server and then choose from a number of styles. The wizard then configures how the elements appear on the Windows Form.
The Data Form Wizard does the following tasks:
Data Form Wizardback to the list of tools
Advanced SQL Generation Options Dialog Box
Data Form Wizard Generated Code
You can use the XSD Editor to create and to edit an XML Schema Definition Language (XSD) schema file in your project. You can edit the XSD file as straight Extensible Markup Language (XML) or in a graphical editor that is similar to the Table Designer and Database Designer of Server Explorer.
You can generate a typed DataSet from an XSD file by setting the Custom Tool property to MSDataSetGenerator. If you leave this property blank, the DataSet class file is no longer a part of the project and will be deleted from the disk.
back to the list of tools
You can use the XML Editor to edit an XML file in your project. You can edit the XML through a text interface that supports color coding and tag completion or through a hierarchical, tabular editor.
back to the list of tools
Connection, Command, DataAdapter, DataSet, and DataView Components
You can add these components from the Data tab of the toolbox, or you can use Server Explorer or the Data Form Wizard to add and to configure these components for you.
You can use the typed DataSet component for design-time data binding. Occasionally, data binding can be a confusing. For example, in a Windows Form, the designer only allows you to bind simple controls one way to a data source, but you can bind a DataGrid control or the list of a ListBox control or a ComboBox control two different ways. One of these ways is incompatible with the way that simple controls are bound. By using a DataView component, you can make sure that all of your controls are consistently bound.
You can open a number of builders from the properties of the various components. For example:
back to the list of tools
Generate Dataset Dialog Box
When you select the graphical design surface or a DataAdapter component, a Generate DataSet hyperlink appears at the bottom of the Property window. In the Generate Dataset dialog box, you can select one or more DataAdapter components on the design surface to query for schema information. The wizard then builds the XSD schema file and typed DataSet class for you. The wizard also gives you the option to add an instance of the DataSet class to the design surface as a component.
For more information about the Generate Dataset dialog box, visit the following Microsoft Web site:
Generate Dataset Dialog Boxback to the list of tools
DataAdapter Configuration Wizard
With the DataAdapter Configuration Wizard, you can configure a DataAdapter that is added through Server Explorer, through the Data Form Wizard, or manually from the toolbox. This wizard includes the following options:
If you select optimistic concurrency, the original value of all fields is checked against the values in the database. If you want to use a TimeStamp or similar version number field to simplify the SQL statement and reduce the data payload, you must build the queries yourself in code or through the Query and View Designer.
For more information about the Data Adapter Configuration Wizard, visit the following Microsoft Web site:
Data Adapter Configuration Wizardback to the list of tools
Parameter Collection Editor
You can use the Parameter Collection Editor to map command parameters to columns in the associated DataTable. You can also map the parameter to a particular row version. For example, when you update a column, the new value is obtained from the current version of the row. However, parameters in the WHERE clause that are used for concurrency checking obtain their value from the original version of the row.
For more information about the Parameters Collection Editor, visit the following Microsoft Web site:
Parameters Collection Editorback to the list of tools
Table Mapping and Column Mapping Editors
With the DataAdapter, you can map table and field names so that the names that are used in a DataSet do not have to match those that are used in the database. You can use the Table Mapping and the Column Mapping Editors to map table and field names that are used in the database to different table and field names in a DataSet.
For more information about the Table Mappings dialog box, visit the following Microsoft Web site:
Table Mappings Dialog Boxback to the list of tools
Data Link Properties Dialog Box
When you select the ConnectString property in a Connection component, you can click Data Link Properties to connect to a new data source. If you are using a SqlConnection component, the data source must be a database in SQL Server 7.0 or later or you will receive an error. This is the same dialog box that is used to add a new connection to Server Explorer.
back to the list of tools
Whenever you edit the schema file, the DataSet class file is automatically rewritten. If you want to customize the DataSet class, use one of the following methods:
The Visual Studio .NET Help topics, walkthroughs, and Microsoft Knowledge Base articles in the sections to follow describe how to use Visual Database Tools and the typed DataSet.
NOTE: The walkthroughs in the section to follow demonstrate how to use the Visual Database Tools to do a particular task; these walkthroughs are not a general tutorial about the tools.
Walkthroughs, data. The Index Results pane displays a list of data access walkthroughs.
Walkthrough: Creating a Master-Detail Windows Form
This walkthrough uses a DataAdapter component. The DataAdapter Configuration Wizard builds a typed DataSet. The walkthrough uses the XSD Editor to create a DataRelation and then binds controls through the Property window to the typed DataSet.Adding Tables and Columns to the Windows Forms DataGrid Control
This article demonstrates how to customize the appearance of a bound Windows Form DataGrid control by adding DataGridTableStyle and DataGridColumnStyle objects through an editor that is opened from the Property window.
What's New in Data
Visual Database Tools
Introduction to Server Explorer
Databases in Server Explorer
Creating Data Adapters Using Server Explorer
Creating Data Adapters Using a Wizard
Creating and Configuring Data Adapters Manually
Creating New Typed Datasets with the XML Designer
(https://support.microsoft.com/kb/315678/EN-US/ )HOW TO: Create and Use a Typed DataSet by Using Visual Basic .NET
(https://support.microsoft.com/kb/320714/EN-US/ )HOW TO: Create and Use a Typed DataSet by Using Visual C# .NET
(https://support.microsoft.com/kb/318039/EN-US/ )HOW TO: Make a Typed DataSet Return a Default Value Instead of DBNull by Using Visual Basic .NET
(https://support.microsoft.com/kb/318048/EN-US/ )HOW TO: Make a Typed DataSet Return a Default Value Instead of DBNull by Using Visual C# .NET
MSDN NewsgroupsThe third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Searching the Knowledge Base
Article ID: 313486 - Last Review: February 27, 2014 - Revision: 6.10