Commit Graph
300 Commits
Author SHA1 Message Date
Marek Safar 5b3813b1d2 [system.data] Fixes DbEnumerator current property to clone read data. Fixes #24452 2014-11-21 10:28:04 +01:00
Zoltan Varga 03aee949f1 Merge pull request #1200 from akoeplinger/remove-jvm
[Cleanup] Remove TARGET_JVM
2014-08-28 19:17:43 -04:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Alexander Köplinger c685b21764 [Cleanup] Removed files that imported Java namespaces
They were once part of a special Java target profile, but this is no longer used today.
2014-08-07 23:01:53 +02:00
Shay Rojansky 4c31accaca Fix DataRow error management
DataRow's RowError is supposed to be String.Empty to indicate
no errors, but is sometimes wrongly set to null, falsely indicating
errors. Fixed to be String.Empty.
2014-07-20 15:48:21 +03:00
Mika Aalto ccd93fc95a Added implementation and unit tests for GetFieldValue, GetStream and GetTextReader methods in DbDataReader class.
Used https://github.com/matthid/mono/commit/51e808b3836e9ba32901762ea23941ee60b2746d as reference.
2014-05-15 17:17:44 -04:00
Fabian König bc69c64bea [DbDataReader] Implement GetFieldValue<T> function to make mono working with EntityFramework 6.x 2014-04-29 23:35:12 +02:00
Eberhard Beilharz 0dd29f1e7f [Sys.Data] Fix Novell Bug #519648
Don't throw an exception when passing "new object[] {null}" to
DataRowCollection.Find. This makes the behaviour more compatible
with .NET. This fixes bug #519648
(https://bugzilla.novell.com/show_bug.cgi?id=519648).
2014-02-27 17:35:54 +01:00
Miguel de Icaza b6d1b4492f Class libraries: introduce mobile_static profile, for MonoTouch-like static builds, but not limited to iOS (WinStore, Kumpera did the work). 2013-07-30 16:51:38 -04:00
Marek Safar 5ad94bd33e Fix copyright author 2013-05-09 10:33:13 +02:00
root 11471bc5a6 Implemented async methods in System.Data.Common 2013-05-03 11:56:05 +00:00
Marek Safar a4915d561e Update mobile tests 2013-03-07 16:34:24 +01:00
Marek Safar 86b142e32e Implement SqlConnection.DbProviderFactory. Fixes #7936 2012-11-01 17:55:59 +01:00
Marek Safar 1c65c12f19 Add some missing methods 2012-07-27 08:54:03 +01:00
Marek Safar e174f682f9 Add some missing methods 2012-07-26 17:27:11 +01:00
Marek Safar 6ea7843351 Add some new async methods 2012-07-19 19:04:26 +01:00
Martin Baulig 2f82cff09c Sync parameter names in System.Data with .NET. 2012-06-11 19:57:09 +02:00
Miguel de Icaza ae0feab435 Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:04:24 -04:00
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
Rolf Bjarne Kvinge 656ca11722 System.Data: DataTable.ImportRow should be able to handle columns with different types. Fixes #2926. 2012-01-17 22:15:51 +01:00
Veerapuram Varadhan 71eb517c49 [ado.net]bugfix:688773 - Assign default value to columns that does not
exist in the row that is being imported.
2011-05-05 03:29:54 +05:30
Jb Evain 432d531126 Enable the System.Data build for monodroid 2010-09-08 18:48:29 +02:00
Raja R Harinath b293948fb7 EOL handling
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.
2010-07-25 20:17:39 +05:30
Veerapuram Varadhan 2ec0a00139 2010-07-23 Veerapuram Varadhan <[email protected]>
** 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.
2010-07-23 18:55:50 +05:30
Veerapuram Varadhan a13bcfb79c changelog changes
svn path=/trunk/mcs/; revision=154271
2010-03-26 13:45:50 +00: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 bba7b6a6f7 2009-10-28 Veerapuram Varadhan <[email protected]>
** 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
2009-10-27 20:18:37 +00:00
Jonathan Pryor 0dd3c5f987 * Makefile: Add Mono.Data.Tds, System.Transactions, System.Data, and
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
2009-10-14 20:55:43 +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 9c7e6d31d1 2009-07-27 Veerapuram Varadhan <[email protected]>
* DbCommandBuilder.cs (CreateUpdateCommand): Don't set Nullable
	property "Original_*" fields.

svn path=/trunk/mcs/; revision=139067
2009-07-30 12:36:57 +00:00
Veerapuram Varadhan 15afef1475 2009-07-24 Veerapuram Varadhan <[email protected]>
* 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
2009-07-30 12:36:23 +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
Veerapuram Varadhan 46cdbd98ec * Utility changes to convert between DbType/SqlDbType/System.Type
svn path=/trunk/mcs/; revision=138434
2009-07-22 18:24:13 +00:00
Marek Habersack e7b286e6b4 Sorry for the noise, but the property is also virtual :)
svn path=/trunk/mcs/; revision=133851
2009-05-10 18:17:33 +00:00
Marek Habersack 7a61811fec The property is protected, not public
svn path=/trunk/mcs/; revision=133850
2009-05-10 18:16:21 +00:00
Marek Habersack b9e3cd32a4 2009-05-10 Marek Habersack <[email protected]>
* DbConnection.cs: implemented the DbProviderFactory property

svn path=/trunk/mcs/; revision=133849
2009-05-10 18:15:05 +00:00
Veerapuram Varadhan 7ed3e19925 2009-03-31 Veerapuram Varadhan <[email protected]>
* 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
2009-03-31 21:59:48 +00:00
Veerapuram Varadhan 02f82de85b 2009-03-31 Veerapuram Varadhan <[email protected]>
* 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
2009-03-31 21:58:38 +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
Raja R Harinath a1cae67e2c Mildly rewrite duplicate-inferring logic.
* Index.cs (IndexDuplicateState): Remove.
(_hasDuplicates): Remove.  Replace by ...
(know_have_duplicates, know_no_duplicates): ... these.

svn path=/trunk/mcs/; revision=122242
2008-12-30 14:58:57 +00:00
Gert Driesen dd1385a13b * DbCommandBuilder.cs: When CatalogSeparator or SchemaSeparator are
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
2008-12-30 10:21:41 +00:00
Gert Driesen fe34437ee6 * DbCommandBuilder.cs: Fixed default value for ConflicOption.
* OdbcCommandBuilder.cs: Added test for ConflictOption default value.

svn path=/trunk/mcs/; revision=122227
2008-12-30 05:11:15 +00:00
Gert Driesen b8ff346173 * DbCommandBuilder.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.
* 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
2008-12-30 03:41:45 +00:00
Gonzalo Paniagua Javier 79db1be679 Use IndexOf (char)
svn path=/trunk/mcs/; revision=122122
2008-12-25 07:47:35 +00:00
Atsushi Eno 622852656f 2008-11-25 Atsushi Enomoto <[email protected]>
* DbDataRecord.cs : it is abstract, so create different impl. class.
	* DbEnumerator.cs : use above.


svn path=/trunk/mcs/; revision=119940
2008-11-25 10:32:45 +00:00
Raja R Harinath 9d0c64bbfd Avoid allocating empty arrays.
* 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
2008-11-17 12:30:45 +00:00
Raja R Harinath 7b06496296 Simplify using some invariants
* 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
2008-11-17 12:30:27 +00:00
Raja R Harinath 9ab60f6e52 * RecordCache.cs: Reduce some extraneous nesting.
svn path=/trunk/mcs/; revision=119006
2008-11-17 12:30:09 +00:00