Commit Graph
2191 Commits
Author SHA1 Message Date
Arina Itkes d94f62e963 Added test for exporting of a generated typed DataSet and DataTable by a same XmlExporter.
svn path=/trunk/mcs/; revision=94671
2008-02-03 10:24:49 +00:00
Arina Itkes a887f826b3 Added test for exporting of a generated typed DataSet and DataTable by a same XmlExporter.
svn path=/trunk/mcs/; revision=94669
2008-02-03 10:19:59 +00:00
Arina Itkes deed4ae382 New DataTable tests added to the project.
svn path=/trunk/mcs/; revision=94236
2008-01-29 09:07:54 +00:00
Arina Itkes 215fb97725 Fix for IXmlSerializable.WriteXml in DataTable class. (Bug 8905)
svn path=/trunk/mcs/; revision=94235
2008-01-29 09:02:25 +00:00
Konstantin Triger 3b37dd78d0 when rh expresssion is null or DBNull always return false
svn path=/trunk/mcs/; revision=93637
2008-01-23 10:27:43 +00:00
Veerapuram Varadhan 2d021cadf4 Tests for 2.0 GetDeleteCommand, GetUpdateCommand and GetInsertCommand
APIs


svn path=/trunk/mcs/; revision=93013
2008-01-16 06:08:48 +00:00
Veerapuram Varadhan 3e74a1fb71 Missing 2.0 APIs
svn path=/trunk/mcs/; revision=93012
2008-01-16 06:03:17 +00:00
Konstantin Triger 14ca20dbb8 add support for string concat (+)
svn path=/trunk/mcs/; revision=91856
2007-12-24 12:59:33 +00:00
Noam Lampert 078bfb7274 Build java configuration using RT of JRE 1.4.2 for support of older java systems
svn path=/trunk/mcs/; revision=91221
2007-12-13 12:01:56 +00:00
Konstantin Triger 701b3ac3e4 refactoring: use Group instead of Captures collection since this is faster on java platform
svn path=/trunk/mcs/; revision=90270
2007-11-25 14:26:41 +00:00
Konstantin Triger 3df125923f update the project file
svn path=/trunk/mcs/; revision=89965
2007-11-20 07:16:43 +00:00
Atsushi Eno 18737776de 2007-11-15 Atsushi Enomoto <[email protected]>
* DbProviderFactoriesConfigurationHandler.cs : Create() now takes
	  parent DataSet into consideration i.e. it now merges items in
	  different configurations. Fixed bug #323708.


svn path=/trunk/mcs/; revision=89701
2007-11-15 20:13:44 +00:00
Atsushi Eno 7aa29313ee 2007-11-14 Atushi Enomoto <[email protected]>
* DataSetTest.cs : added test for r89307 fix (it is for XmlSerializer
	  but needs to be in sys.data).
	* MonkeyDataSet.cs : test support classes (generated by xsd).

	* System.Data_test.dll.sources: added MonkeyDataSet.cs, test helper.


svn path=/trunk/mcs/; revision=89596
2007-11-14 08:10:43 +00:00
Gert Driesen 68ce3413b5 * OdbcDataReader.cs: Code formatting, spaces to tabs.
svn path=/trunk/mcs/; revision=88350
2007-10-28 18:55:50 +00:00
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
Gert Driesen 9605b0fd6c * DbTransactionTest.cs: Enabled test for bug #325397.
svn path=/trunk/mcs/; revision=87837
2007-10-19 17:15:32 +00:00
Gert Driesen 843e73dcd2 * OdbcTransaction.cs: Clear connection in Commit and Rollback.
In IsolationLevel, throw IOE if transaction is no longer open.
* SqlTransaction.cs: Clear connection in commit. In IsolationLevel,
throw IOE if transaction is no longer open.
* OleDbTransaction.cs: Clear connection in Commit and Rollback. In
IsolationLevel and Begin overloads, throw IOE if transaction is no
longer open.

svn path=/trunk/mcs/; revision=87836
2007-10-19 17:12:55 +00:00
Gert Driesen e2681602c2 * DbTransaction.cs: Do not perform a rollback in Dispose (bool).
Leaves it up to deriving classes to override Dispose (bool) and
perform a rollback if necessary. Fixes bug #325397. Code formatting.
* ExceptionHelper.cs: Added TransactionNotUsable method that constructs
an InvalidOperationException to be thrown by IDbTransaction
implementations when the transaction is no longer open.
* OdbcTransaction.cs: Keep state of the transaction, and update it
when performing commit or rollback. In Dispose (bool), only perform
a rollback if transaction was not committed or rollback before.
In Commit and Rollback, throw an InvalidOperationException if
transaction is no longer open.
* SqlTransaction.cs: Avoid unnecessary initialization. Remove
isRolledBack since its essentially the same as isOpen. Use
ExceptionHelper.TransactionNotUsable instead of duplicating code.
On 2.0 profile, ignore call to Rollback when transaction was already
disposed.
* OleDbTransaction.cs: Keep track of whether transaction is open and
whether it's disposed. In Commit an Rollback, throw an IOE if the
transaction is no longer open. In Dispose (bool), perform a rollback
if the transaction is still open.

svn path=/trunk/mcs/; revision=87835
2007-10-19 16:04:39 +00:00
Gert Driesen 0f1a343ecd * OdbcTransaction.cs: Use OdbcIsolationLevel enum value instead of
magic numbers. For Snapshot isolation level, the attribute
SQL_COPT_SS_TXN_ISOLATION must be used instead. When isolation level
is Unspecified, then do not modify the isolation level at all and
lazy initlization the IsolationLevel property. Modified exceptions
for invalid / not supported isolation levels to match MS.
* libodbc.cs: Added attribute for changing SQL Server specific
connection option. Added enum for ODBC isolation level options.
Added SQLGetConnectAttr method.

svn path=/trunk/mcs/; revision=87827
2007-10-19 13:36:40 +00:00
Nagappan Alagappan f7f96709b4 2007-10-19 Nagappan A <[email protected]>
* OdbcDataReaderTest.cs (Bug332404Test): Bug 332404 - ODBC and
	  numeric columns. Thanks to Ernesto Carrea <[email protected]>
	  for the patch and the test case.
	  Fixed compilation issues in Bug332400Test method.


svn path=/trunk/mcs/; revision=87823
2007-10-19 11:50:27 +00:00
Nagappan Alagappan 831403d104 2007-10-19 Nagappan A <[email protected]>
* SqlCommandBuilderTest.cs: Fixed compilation warnings.


svn path=/trunk/mcs/; revision=87822
2007-10-19 11:49:41 +00:00
Gert Driesen d9395404ce * libodbc.cs: Spaces to tabs. Code formatting.
* OdbcConnection.cs: Spaces to tabs. Code formatting.
* OdbcTransaction.cs: Code formatting.

svn path=/trunk/mcs/; revision=87815
2007-10-19 09:06:25 +00:00
Nagappan Alagappan b0fab7fa33 * OleDbCommandBuilder.cs: Implemented ApplyParameterInfo, Dispose,
GetParameterName, GetParameterPlaceholder, RefreshSchema methods.

svn path=/trunk/mcs/; revision=87813
2007-10-19 05:37:24 +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
Nagappan Alagappan 708d62be0a * OdbcCommandBuilder.cs, OdbcParameterCollection.cs: Code alignment.
* OdbcDataReader.cs: Fixes numeric columns, bug # 332404.

svn path=/trunk/mcs/; revision=87810
2007-10-19 05:24:09 +00:00
Nagappan Alagappan 9d903947de * OdbcCommand.cs (Clone): Implemented new method. Code alignment.
svn path=/trunk/mcs/; revision=87809
2007-10-19 05:05:16 +00:00
Nagappan Alagappan d6bcaf6ea4 * DataRelation.cs: Removed bogus TODO.
svn path=/trunk/mcs/; revision=87808
2007-10-19 05:03:23 +00:00
Gert Driesen 4ddc52b0cd * SqlConnectionTest.cs: Added tests for BeginTransaction and GetSchema
when connection is closed.

svn path=/trunk/mcs/; revision=87753
2007-10-18 14:30:29 +00:00
Gert Driesen 7fdd4ffb8d * SqlConnection.cs: Avoid unnecessary initialization. Use string.Empty
for assigning zero-length string, and use String.Length to check for
zero-length string. Added support for IsolationLevel.Snapshot.
Added StructuredTypeMembers schema collection and restrictions. Fixed
table name for MetaDataCollections collection. Implemented
DataSourceInformation collection. Added missing data types (probably
introduced in 2.0 SP1). In GetSchema, throw InvalidOperationException
if connection is closed and throw NotImplementedException for
StructuredTypeMembers collection.

svn path=/trunk/mcs/; revision=87751
2007-10-18 14:21:44 +00:00
Gert Driesen e72a3d8b55 * SqlConnection.cs: On 1.0 profile, IsolationLevel.Unspecified is
not valid. On 2.0 profile, when IsolationLevel.Unspecified is passed
make sure to also set SqlTransaction.IsolationLevel to
ReadCommitted. Modified exceptions to match MS.

svn path=/trunk/mcs/; revision=87735
2007-10-18 08:36:46 +00:00
Noam Lampert c2c765ded6 Java build - build against rt.dll of Java 1.4
svn path=/trunk/mcs/; revision=87733
2007-10-18 08:32:15 +00:00
Nagappan Alagappan 4515ffcb57 * SqlParameter.cs (ConvertToFrameworkType): Added SqlDbType.Image. Fixes bug # 328398.
svn path=/trunk/mcs/; revision=87660
2007-10-17 12:50:27 +00:00
Nagappan Alagappan 741bd7514a * SqlConnection.cs: BeginTransaction does not handle
IsolationLevel.Unspecified, so the default is set as ReadCommited.
  Thanks to Jerome Haltom <[email protected]> for this patch.
  Fixes bug # 333082.
* SqlTransaction.cs: If transaction count is greater then 0 then roll
  back. Thanks to Jerome Haltom <[email protected]> for this
  patch. Fixes bug # 331953.

svn path=/trunk/mcs/; revision=87659
2007-10-17 12:32:16 +00:00
Gert Driesen 720e9720a7 * DbTransactionTest.cs: Added test for bug #325397.
svn path=/trunk/mcs/; revision=87609
2007-10-16 18:23:21 +00:00
Gert Driesen 1cace7c8f7 * SqlException.cs: Do not hide Message on 2.0 profile. Fixes bug
#333901.

svn path=/trunk/mcs/; revision=87509
2007-10-15 13:24:54 +00:00
Nagappan Alagappan ab6b536454 2007-10-12 Nagappan A <[email protected]>
* OdbcDataReaderTest.cs (Bug332400Test): Bug 332400 - ODBC and
	  LONGBLOB columns. Thanks to Ernesto Carrea
	  <[email protected]> for the patch and the test case.


svn path=/trunk/mcs/; revision=87372
2007-10-12 08:29:44 +00:00
Nagappan Alagappan fa0321d3ed * OdbcDataReader.cs: Bug 332400 - ODBC and LONGBLOB columns. Thanks to
Ernesto Carrea <[email protected]> for the patch and the test
  case.

svn path=/trunk/mcs/; revision=87371
2007-10-12 08:24:22 +00:00
Marek Safar ec6b2d44bf 2007-10-08 Marek Safar <[email protected]>
* SqlParameterCollection.cs (SetParameter): Fixed missing cast.
	

svn path=/trunk/mcs/; revision=87092
2007-10-08 13:33:44 +00:00
Marek Safar 5635e31c98 2007-10-08 Marek Safar <[email protected]>
* OdbcParameterCollection.cs (SetParameter): Fixed missing cast.
	

svn path=/trunk/mcs/; revision=87091
2007-10-08 13:20:07 +00:00
Joel Reed 22f03a9378 enhance parsing of Mono.Data.SqlExpressions's SUBSTRING and IIF
svn path=/trunk/mcs/; revision=86725
2007-10-01 21:00:51 +00:00
Veerapuram Varadhan 129c32f749 New tests for Read and Write APIs.
svn path=/trunk/mcs/; revision=86720
2007-10-01 18:43:20 +00:00
Veerapuram Varadhan 1b558f4efe * SqlChars.cs, SqlBytes.cs (Read, Write): Implemented missing 2.0 APIs.
svn path=/trunk/mcs/; revision=86719
2007-10-01 18:40:00 +00:00
Konstantin Triger f181229280 fix the test for net_1_1 profile
svn path=/trunk/mcs/; revision=86657
2007-09-30 07:38:35 +00:00
Nagappan Alagappan c5df65108c * System.Data.dll.sources: Added new files SqlDataSourceConverter.cs,
SqlInitialCatalogConverter.cs, NetworkLibraryConverter.cs.

svn path=/trunk/mcs/; revision=86520
2007-09-27 17:33:09 +00:00
Nagappan Alagappan 38ed697ceb * SqlConnection.cs: Added MonoTODO appropriately.
svn path=/trunk/mcs/; revision=86519
2007-09-27 17:30:19 +00:00
Nagappan Alagappan 3a1e9f864d * OleDbDataReader.cs: Removed bogus MonoTODO.
svn path=/trunk/mcs/; revision=86518
2007-09-27 17:29:36 +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 e4254f41c2 * DataRelationCollection.cs: Added LAME spec comment as there is no
relevant event. Removed MonoTODO too.

svn path=/trunk/mcs/; revision=86516
2007-09-27 17:26:28 +00:00
Nagappan Alagappan db519261ff * SqlMetaData.cs: Implemented an overloaded constructor, missing
properties (DbType, XmlSchemaCollectionDatabase,
  XmlSchemaCollectionName, XmlSchemaCollectionOwningSchema).

svn path=/trunk/mcs/; revision=86515
2007-09-27 17:24:34 +00:00