Files
mono/mcs/class/System.Data/System.Data.SqlClient/SqlError.cs
T
Tim Coleman 06104bff0c 2002-11-09 Tim Coleman <[email protected]>
* list:
                Add new internal tds classes
        * System.Data.Common/DbDataAdapter.cs:
        * System.Data.SqlClient/SqlDataAdapter.cs:
                Change event calling system
        * System.Data.SqlClient/SqlClientPermission.cs:
        * System.Data.SqlClient/SqlClientPermissionAttribute.cs:
        * System.Data.SqlClient/SqlDataReader.cs:
                Add comments
        * System.Data.SqlClient/SqlCommand.cs:
                Some changes to make consistent with .NET based on Sql server traces
                Implement command timeout
        * System.Data.SqlClient/SqlCommandBuilder.cs:
                Make sure that we only build a command if key info found
        * System.Data.SqlClient/SqlConnection.cs:
                Change event calling system
                Some changes to make consistent with .NET based on Sql server traces
                Implement connection timeout
        * System.Data.SqlClient/SqlConnectionPool.cs:
                Implement connection timeout
        * System.Data.SqlClient/SqlError.cs:
                Implement ToString ()
        * System.Data.SqlClient/SqlException.cs:
                Mucho implementation and cleanup
        * System.Data.SqlClient/SqlParameter.cs:
                Implement Clone ()
        * System.Data.SqlClient/SqlParameterCollection.cs:
                Code cleanup
        * System.Data.SqlClient/SqlTransaction.cs:
                Move some of the transaction creation to SqlConnection to be consistent
                with .NET SQL traces

svn path=/trunk/mcs/; revision=8906
2002-11-10 00:36:17 +00:00

100 lines
1.7 KiB
C#

//
// System.Data.SqlClient.SqlError.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
// Tim Coleman ([email protected])
//
// (C) Ximian, Inc 2002
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Data;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient {
/// <summary>
/// Describes an error from a SQL database.
/// </summary>
[Serializable]
public sealed class SqlError
{
#region Fields
byte theClass = 0;
int lineNumber = 0;
string message = "";
int number = 0;
string procedure = "";
string server = "";
string source = "";
byte state = 0;
#endregion // Fields
#region Constructors
internal SqlError (byte theClass, int lineNumber, string message, int number, string procedure, string server, string source, byte state)
{
this.theClass = theClass;
this.lineNumber = lineNumber;
this.message = message;
this.number = number;
this.procedure = procedure;
this.server = server;
this.source = source;
this.state = state;
}
#endregion // Constructors
#region Properties
public byte Class {
get { return theClass; }
}
public int LineNumber {
get { return lineNumber; }
}
public string Message {
get { return message; }
}
public int Number {
get { return number; }
}
public string Procedure {
get { return procedure; }
}
public string Server {
get { return server; }
}
public string Source {
get { return source; }
}
public byte State {
get { return state; }
}
#endregion
#region Methods
public override string ToString ()
{
return Message;
}
#endregion
}
}