Commit Graph
89 Commits
Author SHA1 Message Date
Robert Wilkens 6cfebdcea7 This is a fix for bug # 853 --
see:  https://bugzilla.xamarin.com/show_bug.cgi?id=853

What was happening was ColumnMappings were never being set, so when another
Update function (which this eventually called) went to map the parameters,
it couldn't find any matching column names, so it set all the parameter values
to null.

This code, or very similar code, appeared in:
 public int Update (DataRow [] dataRows)
 public int Update (DataTable dataTable)

But was left out of:
 public int Update (DataSet dataSet, string srcTable)

This code adds the relevant code into the function it was left out of.

Ideally, longer term, this code would be consolidated into a function which
was commonly called by all 3 update functions, but i didn't want to risk
breaking the other two functions which probably already work fine.
2012-05-25 16:33:50 -04:00
Veerapuram Varadhan 7c38ba4b7c 2010-03-26 Veerapuram Varadhan <[email protected]>
** Fixes #564833/580736
    * DbDataAdapter.cs (*Command): Fix for .NET compatibility which
    supports both type of adapters with/without discrete command
    instances.

svn path=/trunk/mcs/; revision=154270
2010-03-26 13:45:38 +00:00
Veerapuram Varadhan e08e9acfcc 1.x build fix
svn path=/trunk/mcs/; revision=139098
2009-07-30 16:57:47 +00:00
Veerapuram Varadhan 6a4a2997d8 2009-07-30 Veerapuram Varadhan <[email protected]>
* SqlDataAdapter.cs (IDbDataAdapter.*Command): Remove over-engineered
	checks as the base implementation is changed.

svn path=/trunk/mcs/; revision=139080
2009-07-30 13:41:31 +00:00
Veerapuram Varadhan 741394be33 2009-07-29 Veerapuram Varadhan <[email protected]>
* DbDataAdapter.cs (*Command properties): Don't call IDbDataAdapter.*Command,
	as provider specific DbDataAdapters would have its own implementation.

svn path=/trunk/mcs/; revision=139069
2009-07-30 12:37:30 +00:00
Veerapuram Varadhan 5ec22cbe2f 2009-07-24 Veerapuram Varadhan <[email protected]>
* DbCommandBuilder.cs (CreateDeleteCommand, CreateUpdateCommand): Add the
	nullcheck-param into the respective command's parameter list.  Fixes
	build breaks.  Individual provider's CommandBuilder classes from 2.0
	profile onwards use the base version of methods to maintain these commands.
	(Get*Command): Cleanup code duplication
	* DbDataAdapter (Update): Use SourceColumnNullMapping property to handle
	nullcheckparams.  Fixes #522624.  Patch by
	Gert Driesen  <[email protected]>.

svn path=/trunk/mcs/; revision=138678
2009-07-25 19:10:42 +00:00
Gert Driesen 13b9781926 * System.Data_test.dll.sources: Added SqlCommandBuilderTest.cs
and SqlParameterTest.cs.
* DbCommandBuilder.cs (QuoteIdentifier): Throw NotSupportedException.
* DbDataAdapter.cs (Update): Add row causing concurrency violation
to DBConcurrencyException.
* OdbcCommandBuilder.cs (QuoteIdentifier): Escape QuoteSuffix
character(s) in unquoted identifier.
* SqlCommandBuilder.cs: Added missing checks for QuotePrefix and
QuoteSuffix on 2.0 profile, and return a zero-length string if
not set (or set to null) on 1.0 profile. Do not allow the value
of CatalogSeparator and SchemaSeparator to be changed from '.'.
Modified generated SQL to match MS. Added implementation for
QuoteIdenfifier. Modified parameters to match MS.
* SqlParameter.cs (SqlValue): Keep Value in sync.
* DbCommandBuilderTest.cs: Added test for QuoteIdentifier.
* OdbcCommandBuilderTest.cs: Enabled test for QuoteIdentifier.
* SqlCommandBuilderTest.cs: Added tests for CatalogLocation,
CatalogSeparator, ConflictOption, QuoteIdentifier, QuotePrefix,
QuoteSuffix  and SchemaSeparator.
* SqlParameterTest.cs: Moved existing tests from ProviderTests
to increase their visibility. Added tests for type inference.

svn path=/trunk/mcs/; revision=122361
2009-01-03 14:24:15 +00:00
Marek Safar 02e9af391d Warnings cleanup
svn path=/trunk/mcs/; revision=111855
2008-08-28 19:08:55 +00:00
Gert Driesen 04897e44fc * DbDataAdapter.cs: Corcompare fixes and code formatting.
* DbDataRecord.cs: Corcompare fixes and code formatting.
* DataColumnMappingCollection.cs: Corcompare fixes and code formatting.
* RowUpdatedEventArgs.cs: Corcompare fixes and code formatting.
* DbParameterCollection.cs: Corcompare fixes and code formatting.

svn path=/trunk/mcs/; revision=98815
2008-03-23 09:15:34 +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 d6b5b3c2df * DbDataAdapter.cs: Added MonoTODO in appropriate place.
* DbCommandBuilder.cs (initializeCommand): Implemented missing API.

svn path=/trunk/mcs/; revision=86517
2007-09-27 17:28:40 +00:00
Nagappan Alagappan ca43995a30 2007-08-10 Nagappan A <[email protected]>
* DbDataAdapter.cs (Fill): Fixed method signature.


svn path=/trunk/mcs/; revision=83797
2007-08-10 05:17:19 +00:00
Nagappan Alagappan 5c266b32df 2007-07-22 Nagappan A <[email protected]>
* DbConnection.cs: 2.0 missing features.

	* DbDataAdapter.cs: 2.0 missing features.


svn path=/trunk/mcs/; revision=82422
2007-07-22 06:42:40 +00:00
Gert Driesen 53332a431f * DbDataAdapter.cs: Marked ICloneable.Clone obsolete to match MS.
svn path=/trunk/mcs/; revision=81108
2007-06-30 13:58:00 +00:00
Nagappan Alagappan d4903c8aca 2007-01-08 Nagappan A <[email protected]>
* DataTableMappingCollection.cs (AddRange):  Implemented missing
	NET 2.0 API.

	* DbConnection.cs (GetSchema): Implemented missing NET 2.0 API,
	based on SqlClient implementation.

	* DbConnectionStringBuilder.cs (AppendKeyValuePair): Implemented
	missing API.

	* DbDataReader.cs (GetData): Implemented missing API.
	(GetDbDataReader): Implemented missing API.

	* DbCommandBuilder.cs (BuildCache, BuildInformation)
	(IncludedInInsert, IncludedInUpdate, IncludedInWhereClause)
	(CreateDeleteCommand, CreateInsertCommand, CreateNewCommand)
	(CreateUpdateCommand, CreateParameter): Added private methods.
	(QuotedTableName, GetQuotedString, CatalogLocation)
	(CatalogSeparator, ConflictOption, DataAdapter, QuotePrefix)
	(QuoteSuffix, SchemaSeparator): Implemented public properties.
	(SourceCommand): Implemented private property.
	(Dispose, RowUpdatingHandler): Implemented protected methods.
	(GetDeleteCommand, GetInsertCommand, GetUpdateCommand)
	(QuoteIdentifier, UnquoteIdentifier, RefreshSchema): Implemented
	public methods.

	* DbProviderFactory.cs: Removed MonoTODO's as the derived class
	has to implement all the methods in this class.

	* DataAdapter.cs (Fill): Implemented missing method.

	* DbDataAdapter.cs (FillCommandBehavior): Implemented property.


svn path=/trunk/mcs/; revision=70620
2007-01-08 05:55:18 +00:00
Nagappan Alagappan 947def72f2 2006-12-20 Nagappan A <[email protected]>
* DataColumnMapping.cs (GetDataColumnBySchemaAction): Implemented
	2.0 profile method.

	* DbDataReader.cs: Removed TODO's where ever the implementation is
	available.

	* RowUpdatedEventArgs.cs: Removed TODO's where ever the
	implementation is available.

	* DataAdapter.cs (FillInternal): Moved from DbDataAdapater.cs to
	here.
	(BuildSchema): Moved from DbDataAdapter.cs.
	(FillTable): Moved from DbDataAdapter.cs.
	(OnFillErrorInternal): Implemented new internal method to raise an
	event.
	(SetupSchema): Moved from DbDataAdapter.cs.
	(FillInterl): Moved common implementation from DbDataAdapter.cs.
	Removed TODO's where ever the implementation is available.

	* DbDataAdapter.cs (OnRowUpdated): Implemented protected method.
	(OnRowUpdating): Implemented protected method.
	(CreateFillErrorEvent): Moved to DataAdapter.cs.
	(Fill): Moved common implementation to DataAdapter.cs.
	(FillTable): Moved to DataAdapter.cs.
	(BuildSchema): Moved to DataAdapter.cs.
	(SetupSchema): Moved to DataAdapter.cs.


svn path=/trunk/mcs/; revision=69818
2006-12-20 17:17:24 +00:00
Nagappan Alagappan 5a6557b7c7 2006-11-28 Nagappan A <[email protected]>
* DbDataAdapter.cs: Removed bogus MonoTODOs

	* DataAdapter.cs: Removed bogus MonoTODOs


svn path=/trunk/mcs/; revision=68578
2006-11-28 13:21:25 +00:00
Nagappan Alagappan 43c40ea6e8 2006-11-15 Nagappan A <[email protected]>
* DbDataAdapter.cs (FillFromReader): Implemented missing API to
	handle FillErrorEventHandler
	(DataAdapter): Implemented missing .NET 2.0 function
	(GetDeleteCommand): Returns DbDataAdapter deleteCommand internal
	variable.
	(GetInsertCommand): Returns DbDataAdapter insertCommand internal
	variable.
	(GetUpdateCommand): Returns DbDataAdapter updateCommand internal
	variable.


svn path=/trunk/mcs/; revision=67900
2006-11-15 12:13:18 +00:00
Konstantin Triger 9e28dfd1d1 added basic implementation for some 2.0 features
svn path=/trunk/mcs/; revision=64991
2006-09-06 10:32:17 +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
Senganal T bd85b69021 2006-04-07 Senganal T <[email protected]>
* Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs :
		- Corrected the testcase to check for queries corresponding to
		ms.net 2.0
		- verify that columns that do not allow nulls are not included
		in the null-checks.
		- Added testcase to check for DBConcurrencyException for
		Delete Command. 
		- Check the DataType of the null-check parameters
	* System.Data.Common/DbDataAdapter.cs :
		* Update () : If the Update/Delete Query has a null check,
		then populate the parameter value correctly.
	*  System.Data.SqlClient/SqlCommandBuilder.cs :
		* CreateDeleteCommand () 
		* CreateUpdateCommand () 
		* CreateInsertCommand () 
			- Changed the signature. Do not need DataRow parameter 
			as the Query generated is parametric.
			- Correct the null-check term in the WhereClause, set the
			correct properties for null-check parameter
			fixes #78027
			- Modified the generated query to match the query as
			generated by 2.0. We now ignore null-check in the
			whereclause if the Column does not allow nulls.
		* ctor () : Set QuotePrefix and QuoteSuffix for 2.0 profile
		* GetUpdateCommand ()
		* GetInsertCommand ()
		* GetDeleteCommand ()
			- Do not create new command everytime. Create only if
			not already created.
		* RefreshSchema : Reset the commands.


svn path=/trunk/mcs/; revision=59175
2006-04-07 12:46:57 +00:00
Senganal T b58ac4f522 2006-03-20 Senganal T <[email protected]>
* System.Data.Common/DataAdapter.cs :
		- Ctor () : Set Default Values for DataAdapter members
	* System.Data.Common/DbDataAdapter.cs : 
		- Update () : Call row.AcceptChanges only if AcceptChangesDuringUpdate
		is true. Fixes bug #77776


svn path=/trunk/mcs/; revision=58185
2006-03-20 14:18:25 +00:00
Senganal T 08c7b22113 2006-02-22 Senganal T <[email protected]>
* Test/System.Data/DataRowCollectionTest2.cs : Check if index is maintained for row on calling RejectChanges. 
	* Test/System.Data/DataTableTest2.cs : Check if data is loaded and merged (if key exists) correctly.
	* Test/System.Data/ForeignKeyConstraintTest.cs : Check if a ParentColumn value can be modified
		when the row is in 'Added' State. Also, check if child col values are
		updated correctly.
	* Test/ProviderTests/System.Data.SqlClient/SqlAdapterTest.cs : Added testcases for verifying FillError Behavior
	* System.Data.Common/DbDataAdapter.cs :
		- FillTable : Move BeginLoadData, EndLoadData outside the loop. Also,
		move EndLoadData outsidet try,catch block. FillError is only for errors
		occuring during loading the data into datatable.
	* System.Data.Common/Key.cs :
		- Set Default value of RowStateFilter to (CurrentRos | OriginalRows).
		- ContainsVersion : If RowStateFilter is set to default value, return true
		for Modified Rows as they can contain Default/Original versions.
	* System.Data/DataRow.cs 
		- RejectChanges : Do not remove Row from Indexes when state is Deleted.
		- CheckChildRows : When checking for the ChildRows, use the current value
		and not the original value.


svn path=/trunk/mcs/; revision=57149
2006-02-22 10:03:03 +00:00
Chris Toshok 3a793df5f4 2006-02-17 Chris Toshok <[email protected]>
* DbDataAdapter.cs: more 2.0 cleanup.


svn path=/trunk/mcs/; revision=57017
2006-02-17 20:11:29 +00:00
Senganal T cfae80d105 2006-02-13 Senganal T <[email protected]>
* Test/ProviderTests/System.Data.SqlClient/SqlAdapterTest.cs : Added testcases for #77480
	* System.Data.Common/DbDataAdapter.cs :
		- FillSchema  : 
			- Add table to schema only if MissingSchemaAction is not Ignore
			Add schema to table if MissingSchemaAction is set to either of
			Add or AddWithKey
		- BuildSchema :
			- Set the Schema values only if MissingSchemaAction is set to
			AddWithKey


svn path=/trunk/mcs/; revision=56830
2006-02-13 06:48:38 +00:00
Senganal T 0051e32108 2006-01-31 Senganal T <[email protected]>
* System.Data.Common/DbDataAdapter.cs :
		- Corrected an error in the prev checkin.. Fixes #77415


svn path=/trunk/mcs/; revision=56336
2006-01-31 15:07:19 +00:00
Senganal T 9c65e65c45 2006-01-27 Senganal T <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs :
		- Modified GetSqlMoney () , to set the precision and Scale correctly.
		- Modified ProcessColumnDetails , to set the schema values correctly.
	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsDataColumn.cs : Added some default values for the column schema
	* System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest : Corrected a failing testcase.
	* System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs : corrected a failing testcase
	* System.Data/System.Data.SqlTypes/SqlDateTime : Corrected the MaxValue for SqlDateTime
	* System.Data/System.Data.Common/DbDataAdapter.cs :
		- Modified schema population to follow MissingSchemaAction and MissingMappingAction
		- Add a column to the Primary Key only if its not a hidden key
		- Added some argument checks
		- Removed some redundant code
	* System.Data/System.Data.Common/DataAdapter :
		- Added argument checks
	* System.Data/System.Data.Common/ExceptionHelper :
		- Added InvalidEnumException , a helper function to print error msg
	* System.Data/System.Data.SqlClient/SqlCommandBuilder.cs :
		- Modified  CreateUpdateCommand,CreateDeleteCommand , to not include
		column name in the query if its a expression col.
		Also, modified the queries to match the generated queries in ms.net
	* System.Data/System.Data.SqlClient/SqlCommand.cs :
		- Modifed Prepare, to check if Parameter is explicitly initialized
	* System.Data/System.Data.SqlClient/SqlParameter.cs :
		- Added CheckIfInitialized : Checks if datatype is explicitly set and
		non-zero size is set for variable datatypes.
	* System.Data/System.Data.SqlClient/SqlDataReader.cs :
		- Added code for GetSqlBinary ()
		- Fixed GetFieldCount ()
		- Added more checks and exceptions. 

Fixes most of the failing SqlClient Provider Tests .

svn path=/trunk/mcs/; revision=56167
2006-01-27 15:54:36 +00:00
Daniel Morgan c34ef44d43 2006-01-01 Daniel Morgan <[email protected]>
* System.Data.Common/DbDataAdapter.cs: fix
	regression for NET_2_0 causing NotImplementedException.
	Fixes bug #77105.

svn path=/trunk/mcs/; revision=54948
2006-01-01 21:07:11 +00:00
Senganal T ec248e159f 2005-11-21 Senganal T <[email protected]>
* System/System.Net/Dns.cs : added GetHostEntry() method for 2.0 api conformance
	* System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs 
		- Marked CheckName method as virtual
	* System.Data/System.Data.ProviderBase/DbParameterBase.cs
		- Marked Offset property and CopyTo method as virtual
	* System.Data/System.Data.Common/DbMetaDataCollectionNames.cs (new file)
		- Added DbMetaDataCollectionNames Enumeration 
	* System.Data/System.Data.dll.sources: 
		- Added System.Data/ConflictOption.cs : Source file for ConflictOption
			enumeration.
	* System.Data/System.Data/ConflictOption.cs (new file)
		- Added ConflictOption Enumeration 
	* System.Data/System.Data/DataTableReader.cs
	* System.Data/System.Data/IDataRecord2.cs 
		- GetProviderSpecificFieldType : Corrected the method name
	* System.Data/System.Data.Common/DbDataAdapter.cs
	* System.Data/System.Data.Common/DbParameter.cs
	* System.Data/System.Data.Common/DbTransaction.cs
	* System.Data/System.Data.Common/DbTable.cs
	* System.Data/System.Data.Common/DbProviderFactories.cs
	* System.Data/System.Data.Common/DbException.cs
	* System.Data/System.Data.Common/DbProviderFactory.cs
	* System.Data/System.Data.Common/DbCommandBuilder.cs
	* System.Data/System.Data.Common/DbDataReader.cs
	* System.Data/System.Data.Common/DbParameterCollection.cs
	* System.Data/System.Data.SqlClient/SqlClientFactory.cs
	* System.Data/System.Data.SqlClient/SqlCommandBuilder.cs
	* System.Data/System.Data.SqlClient/SqlParameterCollection.cs
	* System.Data/System.Data.SqlClient/SqlDataReader.cs
	* System.Data/System.Data.SqlClient/SqlDataAdapter.cs
	* System.Data/System.Data.SqlClient/SqlParameter.cs
	* System.Data/System.Data.SqlClient/SqlTransaction.cs
	* System.Data/System.Data.Odbc/OdbcTransaction.cs
	* System.Data/System.Data.Odbc/OdbcCommandBuilder.cs
	* System.Data/System.Data.Odbc/OdbcParameterCollection.cs
	* System.Data/System.Data.Odbc/OdbcDataReader.cs
	* System.Data/System.Data.Odbc/OdbcFactory.cs
	* System.Data/System.Data.Odbc/OdbcDataAdapter.cs
	* System.Data/System.Data.Odbc/OdbcParameter.cs

	Added stubs and other changes for ADO.NET 2.0 compatibility
	

svn path=/trunk/mcs/; revision=53301
2005-11-21 13:08:48 +00:00
Senganal T b5a6052ffa 2005-10-17 Senganal T <[email protected]>
* Test/ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs :
		- Added Testcase for bug #76433.

	* In System.Data.Common/DbDataAdapter.cs : 
		- BuildSchema() : Set the value of DataColumn Property 'AllowDBNull'
		as returned by database. Fixes bug#76433. 


svn path=/trunk/mcs/; revision=51791
2005-10-17 09:23:19 +00:00
Sureshkumar T 43bef71bf3 In System.Data.Common:
2005-08-05  Sureshkumar T  <[email protected]>

	* DbDataAdapter.cs:
	- Update (): set parameter values only after getting the
	appropriate command from command builder. Close reader only if it
	is not closed before. Use parameter's SourceVersion. Whitespace
	corrections to comply with standard.

In System.Data.SqlClient:
2005-08-05  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs: Set SourceVersion property to the created
	parameters as it is used by the Adapter's Update method.

In System.Data.Odbc:
2005-08-05  Sureshkumar T  <[email protected]>

	* OdbcDataReader.cs: RecordsAffected: get value from command.
	GetSchemaTable (): set IsExpression based on BaseTableName. set
	AllowDBNull to false if the column is PK.

	* OdbcCommand.cs: correct UpdatedRowSource is returned. whitespace
	changes to conform to standard.

	* OdbcCommandBuilder.cs: Implemented.

	* OdbcParameter.cs: Direction is set to Input by default.


svn path=/trunk/mcs/; revision=48043
2005-08-05 14:59:55 +00:00
Sureshkumar T 425bc04d75 In System.Data.Common:
2005-07-15  Sureshkumar T  <[email protected]>

	* DataTableMappingCollection.cs: GetTableMappingBySchemaAction:
	meaningful error message if mapping is missing.

	* DbDataAdapter.cs: Update: meaningful message if table is missing.

In System.Data.SqlClient:
2005-07-15  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs:
	- set_DataAdapter: unsubscribe event if DataAdapter is reset.
	- CreateInsertCommand, CreateUpdateCommand, CreateDeleteCommand:
	if column mapping is missing, use the source column name. use
	proper version to get the data. 
	- RowUpdatingHandler: set status to continue to actually process
	the query.


svn path=/trunk/mcs/; revision=47340
2005-07-15 13:15:36 +00:00
Boris Kirzner 32a7d770ef Changes toward common code base with TARGET_JVM
svn path=/trunk/mcs/; revision=45163
2005-05-29 14:36:27 +00:00
Konstantin Triger b06df0d3be init schema values with defaults if missing
svn path=/trunk/mcs/; revision=44688
2005-05-18 15:57:42 +00:00
Konstantin Triger 2a82592256 merging the Mainsoft branch to the trunk
svn path=/trunk/mcs/; revision=44547
2005-05-15 23:15:37 +00:00
Konstantin Triger 6191c42a03 Rostore the Dispose logic
svn path=/branches/Mainsoft.System.Data/mcs/; revision=43836
2005-05-01 09:58:28 +00:00
Boris Kirzner 13b3fc466d Drop of Mainsoft.System.Data
svn path=/branches/Mainsoft.System.Data/mcs/; revision=43606
2005-04-26 17:20:55 +00:00
Sureshkumar T b1ca844c7e In Test/System.Data:
2005-04-22  Sureshkumar T  <[email protected]>

	* DataTableLoadRowTest.cs: Added. A test case for testing
	LoadDataRow method of DataTable. This tests for various
	possiblities of row state and loadoption.

In System.Data.Common:
2005-04-22  Sureshkumar T  <[email protected]>

	* DbDataAdapter.cs: Moved FillTable and BuildSchema as static
	methods as they are not operating on the current instance. This
	could be reused to fill any table from a data reader.

	* RecordCache.cs: While disposing records, make sure that the
	record is not already disposed. i.e. to make sure later the same
	record is not reused. Implemented a static method to compare two
	version of records in a container.

In .:
2005-04-22  Sureshkumar T  <[email protected]>

	* System.Data_test.dll.sources: Added DataTableLoadRowTest.cs.

In System.Data:
2005-04-22  Sureshkumar T  <[email protected]>

	* LoadOption.cs: Changed the enums. Keeping old values for
	migration.

	* DataTable.cs: Implemented methods Load and its overloads. Also
	implemented LoadDataRow.

	* DataRowCollection.cs: Added a variation of the Find method to
	return a row even if it is of state Deleted. This is required for
	DataTable.LoadDataRow method.

	* DataRow.cs: Implemented internal helper method Load for loading
	values from an object array and given an LoadOption (2.0 feature).

	* DataRowAction.cs: Added few more enums for .net 2.0. Sorted
	alphabetically.


svn path=/trunk/mcs/; revision=43440
2005-04-22 13:11:40 +00:00
Sureshkumar T b3892b3575 In System.Data.Common:
2005-04-18  Sureshkumar T  <[email protected]>

	* DataAdapter.cs: Implemenetd OnFillError handler.

	* DbDataAdapter.cs: BuildSchema (): the table to be filled might
	contain few additional columns as well. so mapping length should
	be columns' length + fields' length.

In System.Data:
2005-04-18  Sureshkumar T  <[email protected]>

        * DataRow.cs: if there are no mapping fields, fill with default
	  value.


svn path=/trunk/mcs/; revision=43192
2005-04-18 05:51:46 +00:00
Sureshkumar T 492b0b97c3 2005-03-24 Sureshkumar T <[email protected]>
* DbDataAdapter.cs: Update: If  SourceColumn is null, do not set
	value for the parameter.


svn path=/trunk/mcs/; revision=42199
2005-03-24 09:29:28 +00:00
Sureshkumar T 65c8a4342c 2005-03-23 Sureshkumar T <[email protected]>
* DbDataAdapter.cs: For Update, disable ReadOnly constraint
	temporarily before updating the row. Info from Ingo Bauersachs.
	SkipAllRemainingRows should also skip current row (msdn).


svn path=/trunk/mcs/; revision=42186
2005-03-24 05:18:34 +00:00
Sureshkumar T a30d0098da 2005-03-22 Sureshkumar T <[email protected]>
* DbDataAdapter.cs: Update (): update the rows based on the
	UpdateRowSource property. Process further based on the
	RowUpdatedEvent handler argument's Status property.

	Fixes bug #73587. Thanks to [email protected] (Ingo Bauersachs) for
	bug report and patch.


svn path=/trunk/mcs/; revision=42094
2005-03-22 10:58:48 +00:00
Sureshkumar T 8e5f7a5975 2005-02-04 Sureshkumar T <[email protected]>
* DbDataAdapter.cs (Update ()) :
	- Check for one return result set and map the values back to
	  datatable.
	- Check for output & return value parameters and update the value
	  back to mapped column
	- check for recordsAffected only after closing the reader.


svn path=/trunk/mcs/; revision=40120
2005-02-04 09:55:38 +00:00
Sureshkumar T 07a11cbd53 2004-12-10 Sureshkumar T <[email protected]>
* DbDataAdapter.cs (BuildSchema): Add the primary key schema iff
	MissingSchemaAction is set to AddWithKey. Also, Add auto increment
	value from the source table. fixes bug #67757 and #69110.


svn path=/trunk/mcs/; revision=37567
2004-12-10 13:39:28 +00:00
Francisco Figueiredo Jr. 60f8562d0b 2004-08-31 Francisco Figueiredo Jr. <[email protected]>
* DbDataAdapter.cs: Fix for out of memory exceptions when trying to fill a dataset with a query which doesn't return a resultset like insert, delete or update.

svn path=/trunk/mcs/; revision=33127
2004-08-31 22:38:50 +00:00
Atsushi Eno 3e2821d002 2004-06-24 Atsushi Enomoto <[email protected]>
* DataColumnMappingCollection.cs : fixed typo.
	* DbDataAdapter.cs : column mappings were not filled.

svn path=/trunk/mcs/; revision=30321
2004-06-24 16:25:02 +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
Gert Driesen 76306c9a15 * DataAdapter.cs: added missing protected ctor
* DbDataAdapter.cs: added stub for missing protected ctor
* DbDataPermission.cs: added stubs for missing protected
ctors, added stub for missing Clear method

svn path=/trunk/mcs/; revision=28817
2004-06-04 05:34:58 +00:00
Boris Kirzner 033e708f3c * RecordCache.cs - added. Each instance of record cache belongs to specific table and manages pool of records ( indexes into data containers) to be used by data rows.
* DataContainer.cs - added. Provides implementation for data containers that holds data in arrays of primitives or objects. Each data container belongs to specific DataColumn.
* DbDataAdapter.cs - changes to complete data storage redesign. Bug fix in FillTable ( to fetch exact number of records required ).

svn path=/trunk/mcs/; revision=27655
2004-05-19 09:46:00 +00:00
Boris Kirzner 4a5e291e23 * DbDataAdapter.cs : Fixed bug in Fill :
- Reader can have empty results (fo example from UPDATE or DELETE).
  - Reader can have results with no rows (SELECT that returns 0 rows but have columns)
  - In FillTable - skip rows only once for each table.

svn path=/trunk/mcs/; revision=25961
2004-04-25 15:46:07 +00:00