Data Source Configuration Wizard

ずっとClub Start KItでDataSet.Xsdの作り方を考えました、今日漸くわかりました、うれしいです。

Visual Studio 2005 Wizards and Designers
Data Source Configuration Wizard
Wizards and Designers

This wizard adds a new XML Schema Definition (.xsd) and supporting files to your project. When you select a data table or stored procedure in the database, the wizard derives a corresponding DataTable object within the data source for the table. The wizard does not configure objects to execute SQL statements or stored procedures in the context of the underlying data source.

The Data Source Configuration Wizard creates and edits data sources in your application. The wizard creates and edits data sources made from databases, Web services, objects, or local data files (Microsoft Access, MSDE/SQL Express). The workflow of the Database Configuration Wizard is as shown in the steps.

  1. Start the wizard using the Add New Data Source button in the Data Sources window. To display the Data Sources window, on the Data menu, click Show Data Sources. This initiates the Data Source Configuration Wizard. You can also select Add New Data Source from the DataSource property of certain Windows Forms Controls.

  2. Depending on the selected data source type (database, Web service, object, or local database file) the wizard takes you to any one of a number of pages in the wizard.

The Data Source Configuration Wizard creates a new DataSet in your project according to the settings that you configure in the wizard.

  • Choose a Data Source Type

    Select the type of data source to create from the available options listed on the Choose a Data Source Type page. The end result of running the wizard is determined by the data source type selected.

    Supported data source types include:

    • Database

    • Local Database File

    • Web Service

    • Object

  • Choose Your Data Connection

    1. You can click the New Connection button on the Choose Your Data Connection page of the wizard to configure a connection to your data source.

    2. This displays the Connection Properties dialog box, where you can specify a data provider and information to configure the ConnectionString of the Connection object.

    3. It is recommended that you use the Test Connection button to ensure that the data source is available and correctly configured.

  • Save connection string to the application configuration file

    1. Select Yes, save the connection as to store the connection string in the application configuration file.

    2. Type a name for the connection or use the provided default name.

  • Choose Your Database Objects

    1. Select the objects you need to bring into the application from your database. You can select it from the available objects which will be displayed in the tree view.

    2. Provide a name for the dataset in the Dataset name area.

    When you specify a SQL Server database as the data connection for your data source, you can select from tables, views, stored procedures, and functions.

  • Add Web Reference

    Here you select an Object you wish to bind to.

    1. Select the object to bind to from the tree view.

    2. After adding the reference, navigate the tree view to the desired type and click Next.

  • Choose a database file

    1. Select the local database file from where you need to create your data source.

    2. Type the path to an available Access database (.mdb file) or a SQL Express database (.mdb file), or click Browse to open the Add Existing Item Dialog Box to locate the file.

    3. Add a new database file from a template

    From:Microsoft