asp.net.ph

DataAdapter.MissingSchemaAction Property

System.Data.Common Namespace   DataAdapter Class


Determines the action to take when existing DataSet schema does not match incoming data.

Syntax


Script DataAdapter.MissingSchemaAction [ = enumValue ]

Property Value


enumValue One of the MissingSchemaAction values.

The property is read/write with a default value of Add.

Exceptions


Exception Type Condition
ArgumentException Occurs when the value set is not one of the MissingSchemaAction values.

Example

The following example initializes a derived class, an SqlDataAdapter, and sets some of its properties.

SqlDataAdapter myAdapter = new SqlDataAdapter ( );
myAdapter.SelectCommand.CommandText = "SELECT * FROM pubs_Titles";
myAdapter.SelectCommand.Connection = new SqlConnection (
   "server=localhost; trusted_connection=yes; database=pubs" );
myAdapter.MissingMappingAction = MissingMappingAction.Error;
myAdapter.MissingSchemaAction = MissingSchemaAction.Error;
  C# VB

See Also

DataAdapter Members   MissingMappingAction Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph