Преглед на файлове

2002-03-24 Rodrigo Moya <[email protected]>

	* System.Data.SqlClient/*: added skeletons for the SQL managed
	provider for ADO.Net, to be based initially in PostgreSQL.

svn path=/trunk/mcs/; revision=3300
Rodrigo Moya преди 24 години
родител
ревизия
9e54799ed6
променени са 30 файла, в които са добавени 868 реда и са изтрити 1 реда
  1. 46 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlCommand.cs
  2. 39 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlConnection.cs
  3. 25 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlDataAdapter.cs
  4. 33 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlDataReader.cs
  5. 20 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlError.cs
  6. 20 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlException.cs
  7. 39 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlParameter.cs
  8. 27 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlParameterCollection.cs
  9. 25 0
      mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlTransaction.cs
  10. 46 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlCommand.cs
  11. 39 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlConnection.cs
  12. 25 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlDataAdapter.cs
  13. 33 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlDataReader.cs
  14. 20 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlError.cs
  15. 20 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlException.cs
  16. 39 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlParameter.cs
  17. 27 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlParameterCollection.cs
  18. 25 0
      mcs/class/Mono.Data.PostgreSqlClient/PgSqlTransaction.cs
  19. 20 0
      mcs/class/Mono.Data.PostgreSqlClient/SqlErrors.cs
  20. 6 1
      mcs/class/System.Data/ChangeLog
  21. 46 0
      mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
  22. 39 0
      mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
  23. 25 0
      mcs/class/System.Data/System.Data.SqlClient/SqlDataAdapter.cs
  24. 33 0
      mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
  25. 20 0
      mcs/class/System.Data/System.Data.SqlClient/SqlError.cs
  26. 20 0
      mcs/class/System.Data/System.Data.SqlClient/SqlErrors.cs
  27. 20 0
      mcs/class/System.Data/System.Data.SqlClient/SqlException.cs
  28. 39 0
      mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
  29. 27 0
      mcs/class/System.Data/System.Data.SqlClient/SqlParameterCollection.cs
  30. 25 0
      mcs/class/System.Data/System.Data.SqlClient/SqlTransaction.cs

+ 46 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlCommand.cs

@@ -0,0 +1,46 @@
+//
+// System.Data.SqlClient.SqlCommand.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a SQL statement that is executed while connected to a SQL database.
+	/// </summary>
+	public class SqlCommand implements IDbCommand
+	{
+		void Cancel();
+		
+		SqlParameter CreateParameter();
+		
+		int ExecuteNonQuery();
+
+		SqlDataReader ExecuteReader();
+
+		SqlDataReader ExecuteReader(CommandBehavior behavior);
+
+		object ExecuteScalar();
+
+		void Prepare();
+
+
+		string CommandText{get; set;}
+
+		int CommandTimeout{get; set;}
+
+		CommandType CommandType{get; set;}
+
+		SqlConnection Connection{get; set;}
+
+		SqlParameterCollection Parameters{get;}
+
+		IDbTransaction Transaction{get; set;}
+
+		UpdateRowSource UpdatedRowSource{get; set;}
+	}
+}

+ 39 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlConnection.cs

@@ -0,0 +1,39 @@
+//
+// System.Data.SqlClient.SqlConnection.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents an open connection to a SQL data source
+	/// </summary>
+	public class SqlConnection : IDBConnection
+	{
+		SqlTransaction BeginTransaction();
+
+		SqlTransaction BeginTransaction(IsolationLevel il);
+
+		void ChangeDatabase(string databaseName);
+
+		void Close();
+
+		SqlCommand CreateCommand();
+
+		void Open();
+
+
+		string ConnectionString{get; set;}
+
+		int ConnectionTimeout{get;}
+
+		string Database{get;}
+
+		ConnectionState State{get;}
+
+	}
+}

+ 25 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlDataAdapter.cs

@@ -0,0 +1,25 @@
+//
+// System.Data.SqlClient.SqlDataAdapter.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
+	/// </summary>
+	public class SqlDataAdapter : IDbDataAdapter
+	{
+		SqlCommand DeleteCommand{get; set;}
+
+		SqlCommand InsertCommand{get; set;}
+
+		SqlCommand SelectCommand{get; set;}
+
+		SqlCommand UpdateCommand{get; set;}
+	}
+}

+ 33 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlDataReader.cs

@@ -0,0 +1,33 @@
+//
+// System.Data.SqlClient.SqlDataReader.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
+	/// </summary>
+	public interface SqlDataReader : IDataReader
+	{
+		void Close();
+		
+		DataTable GetSchemaTable();
+		
+		bool NextResult();
+
+		bool Read();
+
+		int Depth{get;}
+
+		bool IsClosed{get;}
+
+		int RecordsAffected{get;}
+
+
+	}
+}

+ 20 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlError.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlError.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Describes an error from a SQL database.
+	/// </summary>
+	public class SqlError
+	{
+		// TODO
+
+	}
+}

+ 20 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlException.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlException.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Exceptions, as returned by SQL databases.
+	/// </summary>
+	public class SqlException : SystemException
+	{
+		// TODO
+
+	}
+}

+ 39 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlParameter.cs

@@ -0,0 +1,39 @@
+//
+// System.Data.SqlClient.SqlParameter.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
+	/// </summary>
+	public class SqlParameter : IDbDataParameter, IDataParameter
+	{
+		
+		DbType DbType{get;set;}
+
+		ParameterDirection Direction{get;set;}
+
+		bool IsNullable{get;}
+
+		string ParameterName{get;set;}
+
+		string SourceColumn{get;set;}
+
+		DataRowVersion SourceVersion {get;set;}
+
+		object Value {get;set;}
+
+		byte Precision{get; set;}
+
+                byte Scale{get; set;}
+
+                int Size{get; set;}
+
+	}
+}

+ 27 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlParameterCollection.cs

@@ -0,0 +1,27 @@
+//
+// System.Data.SqlClient.SqlParameterCollection.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+using System.Collections;
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
+	/// </summary>
+	public class SqlParameterCollection : IDataParameterCollection
+	{
+		void RemoveAt(string parameterName);
+		
+		int IndexOf(string parameterName);
+		
+		bool Contains(string parameterName);
+
+		object this[string parameterName]{get; set;}
+	}
+}

+ 25 - 0
mcs/class/Mono.Data.PostgreSqlClient/Mono.Data.PostgreSqlClient/PgSqlTransaction.cs

@@ -0,0 +1,25 @@
+//
+// System.Data.SqlClient.SqlTransaction.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a transaction to be performed at a SQL database.
+	/// </summary>
+	public interface SqlTransaction : IDbTransaction
+	{
+		void Commit();
+
+		void Rollback();
+		
+		SqlConnection Connection{get;}
+
+		IsolationLevel IsolationLevel{get;}
+	}	
+}

+ 46 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlCommand.cs

@@ -0,0 +1,46 @@
+//
+// System.Data.SqlClient.SqlCommand.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a SQL statement that is executed while connected to a SQL database.
+	/// </summary>
+	public class SqlCommand implements IDbCommand
+	{
+		void Cancel();
+		
+		SqlParameter CreateParameter();
+		
+		int ExecuteNonQuery();
+
+		SqlDataReader ExecuteReader();
+
+		SqlDataReader ExecuteReader(CommandBehavior behavior);
+
+		object ExecuteScalar();
+
+		void Prepare();
+
+
+		string CommandText{get; set;}
+
+		int CommandTimeout{get; set;}
+
+		CommandType CommandType{get; set;}
+
+		SqlConnection Connection{get; set;}
+
+		SqlParameterCollection Parameters{get;}
+
+		IDbTransaction Transaction{get; set;}
+
+		UpdateRowSource UpdatedRowSource{get; set;}
+	}
+}

+ 39 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlConnection.cs

@@ -0,0 +1,39 @@
+//
+// System.Data.SqlClient.SqlConnection.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents an open connection to a SQL data source
+	/// </summary>
+	public class SqlConnection : IDBConnection
+	{
+		SqlTransaction BeginTransaction();
+
+		SqlTransaction BeginTransaction(IsolationLevel il);
+
+		void ChangeDatabase(string databaseName);
+
+		void Close();
+
+		SqlCommand CreateCommand();
+
+		void Open();
+
+
+		string ConnectionString{get; set;}
+
+		int ConnectionTimeout{get;}
+
+		string Database{get;}
+
+		ConnectionState State{get;}
+
+	}
+}

+ 25 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlDataAdapter.cs

@@ -0,0 +1,25 @@
+//
+// System.Data.SqlClient.SqlDataAdapter.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
+	/// </summary>
+	public class SqlDataAdapter : IDbDataAdapter
+	{
+		SqlCommand DeleteCommand{get; set;}
+
+		SqlCommand InsertCommand{get; set;}
+
+		SqlCommand SelectCommand{get; set;}
+
+		SqlCommand UpdateCommand{get; set;}
+	}
+}

+ 33 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlDataReader.cs

@@ -0,0 +1,33 @@
+//
+// System.Data.SqlClient.SqlDataReader.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
+	/// </summary>
+	public interface SqlDataReader : IDataReader
+	{
+		void Close();
+		
+		DataTable GetSchemaTable();
+		
+		bool NextResult();
+
+		bool Read();
+
+		int Depth{get;}
+
+		bool IsClosed{get;}
+
+		int RecordsAffected{get;}
+
+
+	}
+}

+ 20 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlError.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlError.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Describes an error from a SQL database.
+	/// </summary>
+	public class SqlError
+	{
+		// TODO
+
+	}
+}

+ 20 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlException.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlException.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Exceptions, as returned by SQL databases.
+	/// </summary>
+	public class SqlException : SystemException
+	{
+		// TODO
+
+	}
+}

+ 39 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlParameter.cs

@@ -0,0 +1,39 @@
+//
+// System.Data.SqlClient.SqlParameter.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
+	/// </summary>
+	public class SqlParameter : IDbDataParameter, IDataParameter
+	{
+		
+		DbType DbType{get;set;}
+
+		ParameterDirection Direction{get;set;}
+
+		bool IsNullable{get;}
+
+		string ParameterName{get;set;}
+
+		string SourceColumn{get;set;}
+
+		DataRowVersion SourceVersion {get;set;}
+
+		object Value {get;set;}
+
+		byte Precision{get; set;}
+
+                byte Scale{get; set;}
+
+                int Size{get; set;}
+
+	}
+}

+ 27 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlParameterCollection.cs

@@ -0,0 +1,27 @@
+//
+// System.Data.SqlClient.SqlParameterCollection.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+using System.Collections;
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
+	/// </summary>
+	public class SqlParameterCollection : IDataParameterCollection
+	{
+		void RemoveAt(string parameterName);
+		
+		int IndexOf(string parameterName);
+		
+		bool Contains(string parameterName);
+
+		object this[string parameterName]{get; set;}
+	}
+}

+ 25 - 0
mcs/class/Mono.Data.PostgreSqlClient/PgSqlTransaction.cs

@@ -0,0 +1,25 @@
+//
+// System.Data.SqlClient.SqlTransaction.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a transaction to be performed at a SQL database.
+	/// </summary>
+	public interface SqlTransaction : IDbTransaction
+	{
+		void Commit();
+
+		void Rollback();
+		
+		SqlConnection Connection{get;}
+
+		IsolationLevel IsolationLevel{get;}
+	}	
+}

+ 20 - 0
mcs/class/Mono.Data.PostgreSqlClient/SqlErrors.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlDataReader.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
+	/// </summary>
+	public class SqlErrors : ICollection, IEnumerable
+	{
+		// TODO
+
+	}
+}

+ 6 - 1
mcs/class/System.Data/ChangeLog

@@ -1,3 +1,8 @@
+2002-03-24  Rodrigo Moya <[email protected]>
+
+	* System.Data.SqlClient/*: added skeletons for the SQL managed
+	provider for ADO.Net, to be based initially in PostgreSQL.
+
 2002-02-10  Christopher Podurgiel <[email protected]>
 	
 	* Removed *.cs from System.Data as the correct files are in mcs/class/System.Data/System.Data
@@ -19,4 +24,4 @@
 	* DataColumn : Added
 2002-03-15  Christopher Podurgiel <[email protected]>
 	
-	Changed the Namespace on some Enums from mono.System.Data to System.Data
+	Changed the Namespace on some Enums from mono.System.Data to System.Data

+ 46 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs

@@ -0,0 +1,46 @@
+//
+// System.Data.SqlClient.SqlCommand.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a SQL statement that is executed while connected to a SQL database.
+	/// </summary>
+	public class SqlCommand implements IDbCommand
+	{
+		void Cancel();
+		
+		SqlParameter CreateParameter();
+		
+		int ExecuteNonQuery();
+
+		SqlDataReader ExecuteReader();
+
+		SqlDataReader ExecuteReader(CommandBehavior behavior);
+
+		object ExecuteScalar();
+
+		void Prepare();
+
+
+		string CommandText{get; set;}
+
+		int CommandTimeout{get; set;}
+
+		CommandType CommandType{get; set;}
+
+		SqlConnection Connection{get; set;}
+
+		SqlParameterCollection Parameters{get;}
+
+		IDbTransaction Transaction{get; set;}
+
+		UpdateRowSource UpdatedRowSource{get; set;}
+	}
+}

+ 39 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs

@@ -0,0 +1,39 @@
+//
+// System.Data.SqlClient.SqlConnection.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents an open connection to a SQL data source
+	/// </summary>
+	public class SqlConnection : IDBConnection
+	{
+		SqlTransaction BeginTransaction();
+
+		SqlTransaction BeginTransaction(IsolationLevel il);
+
+		void ChangeDatabase(string databaseName);
+
+		void Close();
+
+		SqlCommand CreateCommand();
+
+		void Open();
+
+
+		string ConnectionString{get; set;}
+
+		int ConnectionTimeout{get;}
+
+		string Database{get;}
+
+		ConnectionState State{get;}
+
+	}
+}

+ 25 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlDataAdapter.cs

@@ -0,0 +1,25 @@
+//
+// System.Data.SqlClient.SqlDataAdapter.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
+	/// </summary>
+	public class SqlDataAdapter : IDbDataAdapter
+	{
+		SqlCommand DeleteCommand{get; set;}
+
+		SqlCommand InsertCommand{get; set;}
+
+		SqlCommand SelectCommand{get; set;}
+
+		SqlCommand UpdateCommand{get; set;}
+	}
+}

+ 33 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs

@@ -0,0 +1,33 @@
+//
+// System.Data.SqlClient.SqlDataReader.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
+	/// </summary>
+	public interface SqlDataReader : IDataReader
+	{
+		void Close();
+		
+		DataTable GetSchemaTable();
+		
+		bool NextResult();
+
+		bool Read();
+
+		int Depth{get;}
+
+		bool IsClosed{get;}
+
+		int RecordsAffected{get;}
+
+
+	}
+}

+ 20 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlError.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlError.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Describes an error from a SQL database.
+	/// </summary>
+	public class SqlError
+	{
+		// TODO
+
+	}
+}

+ 20 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlErrors.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlDataReader.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
+	/// </summary>
+	public class SqlErrors : ICollection, IEnumerable
+	{
+		// TODO
+
+	}
+}

+ 20 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlException.cs

@@ -0,0 +1,20 @@
+//
+// System.Data.SqlClient.SqlException.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Exceptions, as returned by SQL databases.
+	/// </summary>
+	public class SqlException : SystemException
+	{
+		// TODO
+
+	}
+}

+ 39 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs

@@ -0,0 +1,39 @@
+//
+// System.Data.SqlClient.SqlParameter.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
+	/// </summary>
+	public class SqlParameter : IDbDataParameter, IDataParameter
+	{
+		
+		DbType DbType{get;set;}
+
+		ParameterDirection Direction{get;set;}
+
+		bool IsNullable{get;}
+
+		string ParameterName{get;set;}
+
+		string SourceColumn{get;set;}
+
+		DataRowVersion SourceVersion {get;set;}
+
+		object Value {get;set;}
+
+		byte Precision{get; set;}
+
+                byte Scale{get; set;}
+
+                int Size{get; set;}
+
+	}
+}

+ 27 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlParameterCollection.cs

@@ -0,0 +1,27 @@
+//
+// System.Data.SqlClient.SqlParameterCollection.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc
+//
+
+using System.Collections;
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
+	/// </summary>
+	public class SqlParameterCollection : IDataParameterCollection
+	{
+		void RemoveAt(string parameterName);
+		
+		int IndexOf(string parameterName);
+		
+		bool Contains(string parameterName);
+
+		object this[string parameterName]{get; set;}
+	}
+}

+ 25 - 0
mcs/class/System.Data/System.Data.SqlClient/SqlTransaction.cs

@@ -0,0 +1,25 @@
+//
+// System.Data.SqlClient.SqlTransaction.cs
+//
+// Author:
+//   Rodrigo Moya ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Data.SqlClient
+{
+	/// <summary>
+	/// Represents a transaction to be performed at a SQL database.
+	/// </summary>
+	public interface SqlTransaction : IDbTransaction
+	{
+		void Commit();
+
+		void Rollback();
+		
+		SqlConnection Connection{get;}
+
+		IsolationLevel IsolationLevel{get;}
+	}	
+}