After you use the DataAdapter.Fill
method, various properties of the DataTable
objects (such as primary keys, auto increment fields, nullable fields, unique indexes, and so on) are not set.
object is optimized for read-only scenarios by default. The Fill
method only retrieves the amount of schema that is necessary to display the data. You must take extra steps to obtain the additional schema that are necessary to update or validate an object.
To obtain additional information about the DataSet
object, use one of the following methods:
- Call the DataAdapter.FillSchema method to obtain extended schema information.
- Set DataAdapter.MissingSchemaAction to MissingSchemaAction.AddWithKey before you call the Fill method.
For additional information about when to use the FillSchema
method and MissingSchemaAction
property, click the article number below to view the article in the Microsoft Knowledge Base:
When to use FillSchema and MissingSchemaAction
For more information on ADO.NET objects and syntax, see the following Microsoft .NET Framework Software Development Kit (SDK) documentation or MSDN Online:
Article ID: 310373 - Last Review: May 13, 2007 - Revision: 2.7
- Microsoft ADO.NET 2.0
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft Visual Basic .NET 2002 Standard Edition
- Microsoft Visual Basic .NET 2003 Standard Edition
- Microsoft Visual Basic 2005
|kbtshoot kbprb kbsqlclient kbsystemdata KB310373|