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.
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.
With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
** Fixes#565616 - Based on Patch by Hubert FONGARNAND
* DataContainer.cs (GetContainerData): If typecode is string,
call Convert.ToString() irrespective of whether value is
IConvertible or not.
** 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
** Fixes #385028/#385029
* DbCommandBuilder.cs (CreateInsertCommand): Workaround for inserting
DEFAULT values to non-null-columns.
(GetInsertCommand): New overload added to handle above workaround.
(set_DataAdapter): Register for the RowUpdatingEventHandlers.
svn path=/trunk/mcs/; revision=144915
Mono.Data.Sqlite to the MonoTouch build.
* System/System.ComponentModel/TypeConverter_2_1.cs: Skip this type in
the MonoTouch profile; MonoTouch will be using the 2.0 version of
TypeConverter.
* System/System.ComponentModel/ComponentCollection.cs,
System/System.ComponentModel/PropertyDescriptor.cs: MonoTouch uses the
.NET 2.0 versions of these types.
* System/monotouch_System.dll.sources: Add lots of additional .NET 2.0
functionality to the MonoTouch profile.
* System.Transactions/Makefile (VALID_PROFILE): Add monotouch.
* System.Data/System.Data.Common/DbConnection.cs: Throw
NotImplementedException for DbConnection.DbProviderFactory, as
DbProviderFactories isn't included in the MonoTouch profile.
* System.Data/System.Data.SqlClient/SqlConnection.cs: Remove
EnterpriseServices dependency from the MonoTouch profile.
* System.Data/monotouch_System.Data.dll.sources: Added.
* System.Data/System.Data/XmlSchemaDataImporter.cs: Remove
DbProviderFactories dependency in the MonoTouch profile.
svn path=/trunk/mcs/; revision=144150
* SqlDataAdapter.cs (IDbDataAdapter.*Command): Remove over-engineered
checks as the base implementation is changed.
svn path=/trunk/mcs/; revision=139080
* DbDataAdapter.cs (*Command properties): Don't call IDbDataAdapter.*Command,
as provider specific DbDataAdapters would have its own implementation.
svn path=/trunk/mcs/; revision=139069
* DbCommandBuilder.cs (Create*Command): Fill up the missing pieces from
SqlCommandBuilder version of Create*Commands that fixes the failing tests.
svn path=/trunk/mcs/; revision=139065
* 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
* Fixes rest of #480377
* DataContainer.cs (GetContainerData, GetExplicitValue): Added to handle cases
where passed type overloads an explicit operator for conversion of values.
svn path=/trunk/mcs/; revision=130709
* Fixes rest of #480377
* DataContainer.cs (GetContainerData, GetExplicitValue): Added to handle cases
where passed type overloads an explicit operator for conversion of values.
svn path=/trunk/mcs/; revision=130708
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
not set (or explicitly set to null or empty string), then return
default separator character. Added value check for CatalogLocation and
ConflictOption. Removed regions.
* DbCommandBuilderTest.cs: Added tests for properties.
* OdbcCommandBuilderTest.cs: Added tests for properties.
svn path=/trunk/mcs/; revision=122230
QuoteSuffix are not set (or are set to null). Changing QuotePrefix or
QuoteSuffix after a command has been generated should result in an
InvalidOperationException.
* DbConnectionStringBuilder.cs: Added support for ODBC rules. Major
rewrite fixing many compatibility issues, and improving support for
connectionstring formats/characters.
* System.Data_test.dll.sources: Added OdbcCommandBuilderTest.cs,
OdbcConnectionStringBuilderTest.cs and DbCommandBuilderTest.cs.
* libodbc.cs: Add IdentifierQuoteChar to OdbcInfo.
* OdbcCommandBuilder.cs: Return a zero-length string when QuotePrefix
or QuoteSuffix are not set (or are set to null). Changing QuotePrefix
or QuoteSuffix after a command has been generated should result in an
InvalidOperationException. Implemented support for obtaining
character(s) for quoting identifiers from specified connection.
Modified generated SQL to match MS.
* OdbcConnectionStringBuilder.cs: Improved special casing of Driver
and Dsn keywords. Re-use implemenation of DbConnectionStringBuilder.
Improved argument checks to match MS.
* DbCommandBuilderTest.cs: Added tests for QuotePrefix and
QuoteSuffix.
* DbConnectionStringBuilderTest.cs: Added tests for both odbc and
non-odbc rules.
* OdbcCommandBuilderTest.cs: Added tests for QuotePrefix and
QuoteSuffix. Added tests for QuoteIdentifier (some still marked
NotWorking).
* OdbcConnectionStringBuilderTest.cs: Moved from ProviderTests.
Added and improved tests.
svn path=/trunk/mcs/; revision=122225
* Index.cs (empty): New empty array constant.
(Reset): Initialize '_array' to 'empty'.
(RebuildIndex): Don't allocate array if it will be empty.
(FindAllIndexes): Use 'empty' instead of 'new int [0]'.
svn path=/trunk/mcs/; revision=119008
* Index.cs: Remove use of Array and Size properties by taking
advantage of the invariant that _array is never null.
(EnsureArray): Remove.
(Array): Remove.
svn path=/trunk/mcs/; revision=119007
* DataContainer.cs (*.ZeroOut): Rename from the somewhat unclear
'SetDefaultValue'.
(IsNull): Use a more idiomatic form of the short-circuit.
(*.SetValue): Convert to one-liners.
svn path=/trunk/mcs/; revision=112367
* System.Data.Common/DbConnectionStringBuilder.cs: Keys and Values
get properties should return a ReadOnlyCollection
svn path=/trunk/mcs/; revision=111751
* System.Data.Common/DataContainer.cs (DataContainer): Rename from
AbstractDataContainer.
Introduce new 'protected abstract' members to encapsulate
type-specific handling, and move all common code here.
(DataContainer.Create): Rename from CreateInstance.
* System.Data/DataColumn.cs: Update to changes in DataCollection.
(Since a majority of the lines are changed, I decided to dos2unix the file
too)
svn path=/trunk/mcs/; revision=110002
* DbDataReader.cs: Replace a few Type.GetType by typeof
[Found using Gendarme AvoidTypeGetTypeForConstantStringsRule]
svn path=/trunk/mcs/; revision=107358