Files
mono/mcs/class/System.Data/System.Data.SqlClient/SqlErrorCollection.cs
T
Daniel Morgan a459b5d2cc 2002-04-21 Daniel Morgan <[email protected]>
* System.Data.SqlClient/SqlCommand.cs: modified - to
compile using mcs.  This problem is
returning a stronger type in csc vs. msc

* System.Data.SqlClient/SqlConnection.cs: modified - msc
can not do a using PGconn = IntPtr; and then declare
with PGconn pgConn = IntPtr.Zero;
Thiw works under csc though.  Had to comment using and
changed declaration to IntPtr pgConn = IntPtr.Zero;
Also, got rid of compile warnings for hostaddr and port.

* System.Data.SqlClient/SqlErrorCollection.cs: modified - got
rid of compile warnings.  Commented MonoTODO attribute because mcs
doesn't seem to work with C# array property indexer (Item)
this[int index]

* System.Data.SqlClient/SqlParameterCollection.cs: modified -
commented MonoTODO attribute for indexer for mcs compiling

* Test/TestSqlIsolationLevel.cs:
* Test/TestSqlInsert.cs:
* Test/TestSqlException.cs: modified -
removed extra ExecuteNonQuery which caused two inserted rows

svn path=/trunk/mcs/; revision=3938
2002-04-21 12:18:20 +00:00

115 lines
2.1 KiB
C#

//
// System.Data.SqlClient.SqlError.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Collections;
using System.Data;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Describes an error from a SQL database.
/// </summary>
[MonoTODO]
public sealed class SqlErrorCollection : ICollection, IEnumerable
{
ArrayList errorList = new ArrayList();
internal SqlErrorCollection() {
}
internal SqlErrorCollection(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
Add (theClass, lineNumber, message,
number, procedure,
server, source, state);
}
#region Properties
[MonoTODO]
public int Count {
get {
return errorList.Count;
}
}
[MonoTODO]
public void CopyTo(Array array, int index) {
throw new NotImplementedException ();
}
// [MonoTODO]
bool ICollection.IsSynchronized {
get {
throw new NotImplementedException ();
}
}
// [MonoTODO]
object ICollection.SyncRoot {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public IEnumerator GetEnumerator() {
throw new NotImplementedException ();
}
// Index property (indexer)
// [MonoTODO]
public SqlError this[int index] {
get {
return (SqlError) errorList[index];
}
}
#endregion
#region Methods
[MonoTODO]
public override string ToString()
{
throw new NotImplementedException ();
}
#endregion
internal void Add(SqlError error) {
errorList.Add(error);
}
internal void Add(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
SqlError error = new SqlError(theClass,
lineNumber, message,
number, procedure,
server, source, state);
Add(error);
}
#region Destructors
[MonoTODO]
~SqlErrorCollection()
{
// FIXME: do the destructor - release resources
}
#endregion
}
}