INFO: When to Use FillSchema and MissingSchemaAction with the DataAdapter in ADO.NET (310128)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft ADO.NET (included with the .NET Framework 1.1)
This article was previously published under Q310128 SUMMARY
The DataAdapter object is optimized for read-only scenarios by default. The Fill method only retrieves the amount of schema that is necessary to populate a DataSet object. To obtain the additional schema that are necessary to update or validate DataSet objects, use one of the following methods for DataSet objects that are populated by the DataAdapater:
- Use the FillSchema method of the DataAdapter.
- Use the AddWithKey enumeration for the MissingSchemaAction property of the DataAdapter.
This article describes how to choose between these two methods when you want to populate updateable DataSet objects with the DataAdapter.
REFERENCES
For more information, see the following topics in the Microsoft Visual Studio .NET Help documentation:
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
301248 HOW TO: Update a Database from a DataSet Object by Using Visual Basic .NET
301216 HOW TO: Populate a DataSet Object from a Database by Using Visual Basic .NET
Modification Type: | Major | Last Reviewed: | 9/4/2003 |
---|
Keywords: | kbDatabase kbinfo KB310128 |
---|
|