MissingPrimaryKeyException serializable

MissingPrimaryKeyException serializable

System.Data (system.data.dll) class

This exception is thrown when you attempt to invoke the DataRowCollection.Contains( ) or DataRowCollection.Find( ) method on a DataTable that has no primary key. To retrieve primary key information, you can use the IDataAdapter.FillSchema( ) method when accessing a data source. To programmatically set a primary key, you must add a UniqueConstraint (typically by setting the DataColumn.Unique property of the primary key field to true ) and then set the UniqueConstraint.IsPrimaryKey property to true .

 public class  MissingPrimaryKeyException  : DataException {  // Public Constructors  public  MissingPrimaryKeyException  (  );      public  MissingPrimaryKeyException  ( string   s   );  // Protected Constructors  protected  MissingPrimaryKeyException  (System.Runtime.Serialization.SerializationInfo   info   ,         System.Runtime.Serialization.StreamingContext   context   ); } 


System.Object figs/u2192.gif System.Exception(System.Runtime.Serialization.ISerializable) figs/u2192.gif System.SystemException figs/u2192.gif DataException figs/u2192.gif MissingPrimaryKeyException

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