Article ID: 816801 - View products that this article applies to.
When you create a DataSet during design time by using the Generate DataSet option of a DataAdapter, an instance of the DataSet is automatically created on the form. When you modify the name of the DataSet in the Properties window, save the project, and then try to open the form, you may receive the following error message on the form:
When you build your project, you may receive the following error message:
An error occurred while loading the document. Fix the error, and then try loading the document again. The error message follows:
Type 'ApplicationName.OldDataSetName' is not defined.
The problem occurs because when the DataSet name is changed in the DataSet schema file (.xsd), Microsoft Visual Studio 2005 or Microsoft Visual Studio .NET does not modify the DataSet name in the InitializeComponent of the form where the DataSet is initialized.
To resolve this problem, replace the DataSet name with the new name in the code. To do this, follow these steps:
Steps to Reproduce the Behavior
For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
Data Adapter Configuration Wizard
Generate Dataset Dialog Box
Article ID: 816801 - Last Review: May 12, 2007 - Revision: 2.10