Crystal Reports XI Release 2  

Creating a DataSet Schema

You are now ready to create a new Windows project or Web Site, to which you will add an ADO.NET DataSet schema based on a table in the Access database.

To add an ADO.NET DataSet schema to a Windows project or Web Site

Note   This procedure works only with a project that has been created from Project Setup. Project Setup contains specific namespace references and code configuration that is required for this procedure, and you will be unable to complete the procedure without that configuration. Therefore, before you begin this procedure, you must first follow the steps in Project Setup.
  1. In the Solution Explorer, right-click the project name that is in bold type, point to Add, and then click Add New Item.
  2. In the Add New Item dialog box, in the Templates list, do the following:
    • For a Windows project, select DataSet.
    • For a Web Site, select XML Schema.
  3. In the Name field, enter "CustomerDataSetSchema.xsd," and then click Add.
  4. From the Server Explorer, drag the Customer table (located under the node ACCESS>Tables>Customer) onto the CustomerDataSetSchema.xsd window.
  5. From the Build menu, click Build Solution.

    A strongly-typed DataSet class is generated from the schema.

    Note   In a Visual Studio 2005 Web Site there is no strongly-typed DataSet class. Later in this tutorial you learn how to write code to generate your own DataSet class that is based on the CustomerDataSetSchema.xsd.
  6. From the File menu, click Save All.

Continue to Writing a Helper Class to Populate the DataSet.

See Also

Tutorial: Connecting to ADO.NET DataSets | Tutorials and Sample Code | Tutorials' Sample Code Directory