Commit Graph
26 Commits
Author SHA1 Message Date
Gert Driesen c231373769 * DataColumn.cs: Fixed ParamName of ArgumentNullException. Modified
exception message for invalid DateTimeMode value to match MS. Code
formatting.
* DbDataPermissionAttribute.cs: In KeyRestrictionBehavior, reuse
ExceptionHelper.CheckEnumValue.   
* ExceptionHelper.cs: Use same exception message for both 1.0 and 2.0.
* Index.cs: Fixed compiler warnings. Code formatting.
* SqlCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* OleDbCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* DBDataPermissionAttributeTest.cs: Improved test for invalid
KeyRestrictionBehavior. Fixed line endings.
* DataColumnTest.cs: No longer derive from deprecated Assertion class.
Code formatting. Added test for DateTimeMode.

svn path=/trunk/mcs/; revision=87866
2007-10-21 13:26:43 +00:00
Gert Driesen 3930b4b9cf * System.Data_test.dll.sources: Added DbDataAdapterTest.cs,
OdbcCommandTest.cs, OdbcConnectionTest.cs, OdbcDataAdapterTest.cs, 
OleDbCommandTest.cs, OleDbConnectionTest.cs, OleDbDataAdapterTest.cs, 
SqlDataAdapterTest.cs.
* DbDataAdapter.cs: Implemented UpdateBatchSize setter.
* DataAdapter.cs: In FillLoadOption setter, ensure value is valid.
Modified MissingMappingAction and MissingSchemaAction setters to use
ExceptionHelper.CheckEnumValue to validate value. Spaces to tabs and
code formatting.
* ExceptionHelper.cs: Added CheckEnumValue method and modified
InvalidEnumValueException method to return AORE on 2.0 profile. Added
ConnectionClosed method that returns an InvalidOperationException.
* OleDbDataAdapter.cs: In default ctor, set SelectCommand to null.
Only initialize SelectCommand in ctors. Use direct assignment in
IDbDataAdapter implementation.
* OleDbCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Added implementation for UpdatedRowSource.
* OleDbConnection.cs: Moved initialization of gda to Open ().
Avoid unnecessary initialization. Return zero-length string if
ConnectionString is null. If getters to Database, DataSource and
Provider return zero-length string if the connection is closed.
In ServerVersion, BeginTransaction and GetSchema, throw an
InvalidOperationException if connection is closed.
* OdbcCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Spaces to tabs and code formatting.
* OdbcError.cs: Fixed typo in exception message.
* OdbcConnection.cs: Return zero-length string if ConnectionString is
null. In getters for Database, DataSource and Driver return a
zero-length string if connection is closed. In BeginTransaction and
GetSchema throw InvalidOperationException if connection is closed.
Added override for GetSchema (string, string []). Use string.Empty
instead of "".
* OdbcDataAdapter.cs: Avoid unnecessary initializations. Use direct
assignment in IDbDataAdapter implementation. In default ctor, set
SelectCommand to null.
* SqlCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Use ExceptionHelper.InvalidEnumValueException
to avoid code duplication. Spaces to tabs and code formatting.
* SqlConnection.cs: Use different default package size on 2.0 profile.
Added constants for default values, instead of using magic numbers.
Avoid unnecessary initialization. In PacketSize, return default or
configured packet size when connection is not open. Use 
ExceptionHelper.ConnectionClosed instead of local method. Removed   
use of some hardcoded values in SetDefaultConnectionParameters, and
use Environment.MachineName as default WorkstationId instead of 
DNS host name. Code formatting.
* SqlDataAdapter.cs: In default ctor, set SelectCommand to null.
Avoid unnecessary initializations. Use direct assignment in   
IDbDataAdapter implementation. Fixed exception message for negative
UpdateBatchSize. In Dispose override, make sure to invoke base
method.
* DbDataAdapterTest.cs: Added test for UpdateBatchSize.
* DataAdapterTest.cs: Added tests for AcceptChangesDuringFile,   
AcceptChangesDuringUpdate, ContinueUpdateOnError, FillLoadOption,
MissingMappingAction, MissingSchemaAction and                      
ReturnProviderSpecificTypes.
* OdbcDataAdapterTest.cs: Added tests for ctors, DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand and Dispose.
* OdbcDataReaderTest.cs: fixed line endings.
* OdbcCommandTest.cs: Added tests for ctors and CommantText.
* OdbcConnectionTest.cs: Removed original test that relied on MySQL.
Added ctor tests. Added tests for BeginTransaction, GetSchema and 
ServerVersion with connection that is closed.
* OleDbDataAdapterTest.cs: Added tests for ctors, DeleteCommand, 
InsertCommand, SelectCommand, UpdateCommand and Dispose.
* OleDbCommandTest.cs: Added tests for ctors and CommandText.
* OleDbConnectionTest.cs: Added tests for ctors and ConnectionString. 
Added tests for BeginTransaction, GetSchema and ServerVersion with connection that is closed.
* SqlCommandTest.cs: Added tests for ctors and CommantText. 
* SqlConnectionTest.cs: Added tests for ctors, ConnectionString and 
ServerVersion.
* SqlDataAdapterTest.cs: Added tests for ctors, DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand, UpdateBatchSize and 
Dispose.

svn path=/trunk/mcs/; revision=87859
2007-10-20 23:16:52 +00:00
Nagappan Alagappan faa0c2c306 * OleDbCommand.cs: Implemented Clone, Dispose methods.
Implemented CreateDbParameter, DbConnection, DbParameterCollection,
  DbTransaction, ExecuteDbDataReader properties.

* OleDbParameterCollection.cs: Fixed 1.0 API compatibility.

svn path=/trunk/mcs/; revision=87811
2007-10-19 05:32:09 +00:00
Gert Driesen ec7ef9e49b * OleDbCommand.cs: 2.0 API fixes. Build fix.
svn path=/trunk/mcs/; revision=81145
2007-07-01 13:39:50 +00:00
Gert Driesen d832928b7f * OleDbCommand.cs: Code formatting.
* OleDbError.cs: Code formatting.
* OleDbErrorCollection.cs: Code formatting.
* OleDbException.cs: Code formatting.
* OleDbInfoMessageEventArgs.cs: Code formatting.

svn path=/trunk/mcs/; revision=81142
2007-07-01 12:48:34 +00:00
Nagappan Alagappan 2f4c29c144 2007-01-08 Nagappan A <[email protected]>
* OleDbCommand.cs: Fixed compilation warning.

	* OleDbDataAdapter.cs: Fixed compilation warning.


svn path=/trunk/mcs/; revision=70617
2007-01-08 05:53:46 +00:00
Senganal T dbcfcb27fe 2006-07-13 Senganal T <[email protected]>
* Test/System.Data.Common/DBDataPermissionTest.cs : Removed invalid tests

	* System.Data.Common/SchemaInfo.cs DbDataAdapter.cs DbConnectionOptions.cs DbParameter.cs 
	DbMetaDataColumnNames.cs DbTransaction.cs DataTableMapping.cs DataAdapter.cs 
	FieldNameLookup.cs DbDataRecord.cs DataColumnMappingCollection.cs DbCommand.cs 
	DbDataPermission.cs DbProviderFactory.cs DbCommandBuilder.cs DbConnectionString.cs 
	RowUpdatedEventArgs.cs DbDataReader.cs DbConnectionStringBuilder.cs DbConnection.cs 
	DataTableMappingCollection.cs :
		2.0 Api fixes

	* System.Data.SqlClient/SqlClientFactory.cs SqlCommand.cs SqlConnectionFactory.cs 
	SqlClientPermission.cs SqlParameterCollection.cs SqlDataReader.cs 
	SqlConnection.cs SqlParameter.cs SqlTransaction.cs :
		2.0 Api fixes

	* System.Data.Odbc/OdbcTransaction.cs OdbcCommand.cs OdbcConnectionFactory.cs 
	OdbcPermission.cs OdbcDataReader.cs OdbcParameterCollection.cs 
	OdbcConnection.cs OdbcFactory.cs OdbcParameter.cs :
		2.0 Api fixes

	* System.Data.OleDb/OleDbCommand : 2.0 Api fixes

	* System.Data.dll.sources: 
		- Added to build :
			System.Data.Common/DbMetaDataColumnNames.cs
		- Removed from build :
			System.Data.Common/DbCommandOptionalFeatures.cs
			System.Data.Common/DbCommandSet.cs
			System.Data.Common/DbProviderSupportedClasses.cs
			System.Data.Common/SchemaLocation.cs
			System.Data.Odbc/OdbcConnectionFactory.cs
			System.Data.SqlClient/SqlConnectionFactory.cs
			System.Data.ProviderBase/DbCommandBase.cs
			System.Data.ProviderBase/DbConnectionBase.cs
			System.Data.ProviderBase/DbConnectionFactory.cs
			System.Data.ProviderBase/DbConnectionInternal.cs
			System.Data.ProviderBase/DbConnectionPoolCounters.cs
			System.Data.ProviderBase/DbConnectionPoolOptions.cs
			System.Data.ProviderBase/DbDataReaderBase.cs
			System.Data.ProviderBase/DbMetaDataFactory.cs
			System.Data.ProviderBase/DbParameterBase.cs
			System.Data.ProviderBase/DbParameterCollectionBase.cs
			System.Data.ProviderBase/DbReferenceCollection.cs

	* Makefile : Add System.Transactions library reference to net_2_0 PROFILE


svn path=/trunk/mcs/; revision=62561
2006-07-13 14:19:17 +00:00
Chris Toshok c21950a927 In System.Data.OleDb:
* OleDbDataAdapter.cs, OleDbCommand.cs, OleDbParameter.cs,
	OleDbCommandBuilder.cs, OleDbConnection.cs: remove
	DataSysDescriptions for >= 2.0.

2006-02-17  Chris Toshok  <[email protected]>

In System.Data.SqlClient:
	* SqlCommand.cs, SqlCommandBuilder.cs, SqlConnection.cs,
	SqlDataAdapter.cs: remove DataSysDescription attributes for >= 2.0

2006-02-17  Chris Toshok  <[email protected]>

In System.Data:
	* System.Data/DataSet.cs, System.Data/DataView.cs,
	System.Data/ForeignKeyConstraint.cs,
	System.Data/DataViewManager.cs, System.Data/DataRow.cs,
	System.Data/DataSysDescriptionAttribute.cs,
	System.Data/UniqueConstraint.cs, System.Data/DataTable.cs,
	System.Data/DataRelation.cs: lots of attribute work, removing
	DataSysDescription atributes (and marking the class obsolete) for
	2.0.

2006-02-17  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=57018
2006-02-17 20:34:22 +00:00
Chris Toshok 99fe9f1fb7 2006-02-17 Chris Toshok <[email protected]>
* OleDbCommand.cs: remove extra using System.Data.  fixes warning.


svn path=/trunk/mcs/; revision=56985
2006-02-17 17:01:44 +00:00
Gert Driesen e496700e86 * OleDbDataAdapter.cs: Fixed custom attributes to match MS.NET.
* OleDbCommand.cs: Fixed custom attributes to match MS.NET.
* OleDbParameter.cs: Fixed custom attribute to match MS.NET.
* OleDbException.cs: Added ErrorTypeConverter, assigned to ErrorCode
property to match MS.NET.
* OleDbConnection.cs: Fixed custom attributes to match MS.NET.

svn path=/trunk/mcs/; revision=48142
2005-08-08 17:33:12 +00:00
Lluis Sanchez 66f0e94977 2005-02-16 Lluis Sanchez Gual <[email protected]>
* OleDbCommand.cs: Make it inherit from the correct base class in 2.0,
	and added stubs for some interface methods.


svn path=/trunk/mcs/; revision=40771
2005-02-16 20:36:18 +00:00
Sachin Kumar ec81df777c Add license and copyright to all source files in System.Data
svn path=/trunk/mcs/; revision=29688
2004-06-16 13:52:11 +00:00
Umadevi S 6a6f2c9260 2004-05-14 Umadevi S ([email protected])
* OleDbCommand.cs - Completed implementing all the attribute

svn path=/trunk/mcs/; revision=27349
2004-05-14 07:44:01 +00:00
Gert Driesen 2a4777e37a * OleDbCommand.cs: removed setter for Parameters property to
match MS.NET
* OleDbCommandBuilder.cs: fixed GetUpdatetCommand typo
* OleDbErrorCollection: added default internal ctor to match
MS.NET
* OleDbInfoMessageEventArgs.cs: added default internal ctor
to match MS.NET
* OleDbParameter.cs: added setter for IsNullable
* OleDbParameterCollection: added default internal ctor to
match MS.NET
* OleDbPermission.cs: removed extra IsSubsetOf method

svn path=/trunk/mcs/; revision=26996
2004-05-09 17:07:58 +00:00
Rodrigo Moya 5ae39b1746 2002-10-27 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbDataAdapter.cs (Fill, FillSchema,
	GetFillParameters, Update): added overloaded methods.

	* System.Data.OleDb/OleDbCommand.cs:
	* System.Data.OleDb/OleDbDataReader.cs:
	* System.Data.OleDb/OleDbConnection.cs: removed limitation of one
	data adapter at a time. Mono's version can open as many as you want,
	for free.

svn path=/trunk/mcs/; revision=8616
2002-10-28 10:59:37 +00:00
Rodrigo Moya a9c99094e5 2002-09-28 Vladimir Vukicevic� <[email protected]>
* System.Data.OleDb/OleDbConnection.cs: Close
	reader properly in call to ExecuteScalar().

svn path=/trunk/mcs/; revision=7918
2002-10-01 22:09:43 +00:00
Rodrigo Moya 791abbc22e 2002-08-20 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbConnection.cs (DataReader): new internal
	property.
	(Close): set the dataReader to null.

	* System.Data.OleDb/OleDbDataReader.cs (OleDbDataReader): set the
	connection's DataReader property to this object.
	(Close): set it to null here.
	(Depth, IsDbNull): implemented.
	(this): implemented the Item property with a string indexer.

	* System.Data.OleDb/OleDbCommand.cs (ExecuteNonQuery, ExecuteReader,
	ExecuteScalar): do nothing if there's already an open data reader.

	* System.Data.OleDb/libgda.cs: more API functions.

	* System.Data.OleDb/TestOleDb.cs (TestDataReader): close the data
	reader before continuing.

svn path=/trunk/mcs/; revision=6847
2002-08-21 10:09:22 +00:00
Rodrigo Moya 6a793a7e4c 2002-08-15 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): check values
	for NULL before passing them to Marshal.PtrToStructure, which issues
	an exception if the value is NULL.

svn path=/trunk/mcs/; revision=6660
2002-08-16 01:35:51 +00:00
Rodrigo Moya 58da214495 2002-08-15 Rodrigo Moya <[email protected]>
* System.Data/UniqueConstraint.cs (UniqueConstraint): commented
	unreachable code to avoid compiler warning.

	* System.Data.OleDb/libgda.cs (GdaList): added new internal class.

	* System.Data.OleDb/OleDbConnection.cs (DataSource): implemented.
	(OpenReader): removed internal method.

	* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): split correctly
	the list of returned data models.

svn path=/trunk/mcs/; revision=6659
2002-08-16 01:19:29 +00:00
Rodrigo Moya 791551a1fd 2002-08-11 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added some GdaValue functions.

	* System.Data.OleDb/OleDbCommand.cs (OpenReader): removed this
	internal method, since we don't need it.
	(ExecuteReader): call SetupGdaCommand before executing the command
	via libgda functions.
	(ExecuteScalar): implemented.

	* System.Data.OleDb/OleDbDateReader.cs (OleDbDataReader): removed call
	to OleDbCommand.OpenReader.
	(GetBoolean): implemented.

svn path=/trunk/mcs/; revision=6597
2002-08-12 15:43:20 +00:00
Rodrigo Moya 11d169f36a 2002-07-29 Rodrigo Moya <[email protected]>
* OleDbDataReader.cs (OleDbDataReader constructor): changed to receive
	a second argument (ArrayList results).
	(NextResult): implemented.

	* OleDbCommand.cs: don't store the ArrayList of results, since we'll
	pass that to the OleDbDataReader.
	(OleDbCommand constructor): don't create the ArrayList of results.
	(GdaResults): removed property.
	(ExecuteReader): create a temporary ArrayList and pass that to the
	OleDbDataReader constructor.

svn path=/trunk/mcs/; revision=6236
2002-07-29 10:12:21 +00:00
Rodrigo Moya 9e3aae2189 2002-07-28 Rodrigo Moya <[email protected]>
* OleDbCommand.cs (ExecuteReader):
	(CreateParameter): implemented IDbCommand methods.
	(CommandText): don't create many GdaCommand's, only one is needed.
	(ExecuteNonQuery): set up the internal GDA command object.
	(ExecuteReader): use correctly the unique GDA command object.

	* libgda.cs: added new libgda calls.

svn path=/trunk/mcs/; revision=6232
2002-07-28 23:28:55 +00:00
Rodrigo Moya 709cc26e5a 2002-07-27 Rodrigo Moya <[email protected]>
* OleDbConnection.cs (CreateCommand):
	(BeginTransaction): implemented IDbConnection methods.

svn path=/trunk/mcs/; revision=6230
2002-07-28 22:55:32 +00:00
Tim Coleman c95e199818 2002-07-09 Tim Coleman <[email protected]>
* OleDbCommand.cs: Style changes, added new methods
       * OleDbConnection.cs: Style changes, added new methods
       * OleDbDataAdapter.cs: Implementation
       * OleDbDataReader.cs: Added stubbs
       * OleDbErrorCollection.cs: Added stubbs, some implementation
       * OleDbParameter.cs: Style changes, added new methods
       * OleDbParameterCollection.cs: Style changes, added new methods
       * OleDbPermissionAttribute.cs: Style changes, added new methods
       * OleDbRowUpdatedEventArgs.cs: Added stubbs
       * OleDbRowUpdatingEventArgs.cs: Added stubbs
       * OleDbTransaction.cs: Style changes, added new methods
       * OleDbType.cs: Fixed two typos
       * libgda.cs: Style changes, added new methods

svn path=/trunk/mcs/; revision=5668
2002-07-09 13:47:54 +00:00
Rodrigo Moya 4856bf9df7 2002-06-02 Rodrigo Moya <[email protected]>
* OleDbTransaction.cs (Dispose): added missing method.

	* OleDbCommand.cs (Clone): added missing methods.
	(Parameters, Transaction, Connection): made these overload
	IDbCommand's ones.

	* OleDbParameterCollection.cs (IndexOf, Remove, RemoveAt):
	call m_list methods, not own ones.

	* OleDbParameter.cs: more implementation.

svn path=/trunk/mcs/; revision=5091
2002-06-02 14:41:11 +00:00
Rodrigo Moya 3b7256d489 2002-05-27 Rodrigo Moya <[email protected]>
Started System.Data.OleDb provider, based on libgda.

svn path=/trunk/mcs/; revision=4993
2002-05-28 19:13:30 +00:00