MissingSchemaAction serializable

MissingSchemaAction serializable

System.Data (system.data.dll) enum

This enumeration specifies what happens when adding information to a DataSet and the schema information can't be found. This enumeration is used when merging two DataSet objects (with the DataSet.Merge( ) method) and when filling a DataSet from a data source using the IDataAdapter.Fill( ) method. In the first case, a MissingSchemaAction value is specified as a parameter. In the second case, a MissingSchemaAction value is set using the IDataAdapter.MissingSchemaAction property.

If set to Add , the new missing DataColumn objects are added to the DataSet . If set to AddWithKey (the default when filling a DataSet ), the required DataColumn objects are added, and ADO.NET tries to determine the primary key. In the case of the SQL Server provider, this involves appending the FOR BROWSE clause on the SQL statement and parsing out the additional information. In the case of an OLE DB provider, this involves setting the DBPROP_UNIQUEROWS property, and then determining which columns are primary key columns by examining DBCOLUMN_KEYCOLUMN in the IColumnsRowset . (Not all OLE DB providers support this technique. If you experience problems, use Add instead of AddWithKey and set the primary key manually.) Finally, you can specify Ignore , in which case data in a missing column will not be added, or Error , in which case a System.SystemException is thrown if data is encountered for a column that doesn't exist.

 public enum  MissingSchemaAction  {  Add = 1  ,  Ignore = 2  ,  Error = 3  ,  AddWithKey = 4  } 


System.Object figs/u2192.gif System.ValueType figs/u2192.gif System.Enum(System.IComparable, System.IFormattable , System.IConvertible) figs/u2192.gif MissingSchemaAction

Returned By

System.Data.Common.DataAdapter.MissingSchemaAction , IDataAdapter.MissingSchemaAction

Passed To

System.Data.Common.DataAdapter.MissingSchemaAction , System.Data.Common.DataColumnMapping.GetDataColumnBySchemaAction( ) , System.Data.Common.DataTableMapping.GetDataTableBySchemaAction( ) , DataSet.Merge( ) , IDataAdapter.MissingSchemaAction

ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net