[ Team LiB ] Previous Section Next Section

SqlException serializable

System.Data.SqlClient (system.data.dll) sealed class

This exception represents a data source error. For example, if you attempt to execute a SQL statement that is syntactically incorrect or try to open a connection to a database server that can't be found, this exception is thrown. Every SqlException contains at least one SqlError , identifying the problem, in the SqlErrorCollection object. Errors that happen while disconnected from the data source (such as violating a System.Data.DataSet constraint or attempting to access a deleted row) result in a more specific exception from the System.Data namespace.

public sealed class SqlException : SystemException {
// Public Instance Properties
   public byte Class{get; } 
   public SqlErrorCollection Errors{get; } 
   public int LineNumber{get; } 
   public override string Message{get; }            // overrides Exception
   public int Number{get; } 
   public string Procedure{get; } 
   public string Server{get; } 
   public override string Source{get; }          // overrides Exception
   public byte State{get; } 
// Public Instance Methods
   public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si,
        System.Runtime.Serialization.StreamingContext context);             // overrides Exception
}

Hierarchy

System.Object figs/U2192.gif System.Exception(System.Runtime.Serialization.ISerializable) figs/U2192.gif System.SystemException figs/U2192.gif SqlException

    [ Team LiB ] Previous Section Next Section