Commit Graph
2461 Commits
Author SHA1 Message Date
Martin Baulig 5482c75a0a Add .gitignore's.
svn path=/trunk/mcs/; revision=128880
2009-03-09 14:14:56 +00:00
Veerapuram Varadhan c59f2dd2ba * *Fixes #377146 - in a better way
* XmlDataReader.cs (ReadElementElement): For reference types
          that implements IXmlSerializable, call the corresponding ReadXml.
        * DataSet.cs (WriteColumnAsElement): For reference types that
          implements IXmlSerializable, call the corresponding WriteXml.

svn path=/trunk/mcs/; revision=127849
2009-02-24 09:27:32 +00:00
Veerapuram Varadhan 2b1c534a40 * Fixes #476523
* DbType.cs: Add DateTime2 and DateTimeOffset - 3.5 additions
        Patch by Jay Wren <[email protected]>


svn path=/trunk/mcs/; revision=127836
2009-02-24 04:58:27 +00:00
Veerapuram Varadhan 5ada033601 Added test for 419224.
svn path=/trunk/mcs/; revision=127544
2009-02-20 15:48:25 +00:00
Veerapuram Varadhan c55231b62e * OdbcDataReader.cs (GetValue): Handle null image data. Fixes
##419224. Patch by John Mortlock <[email protected]>.


svn path=/trunk/mcs/; revision=127530
2009-02-20 11:40:42 +00:00
Gonzalo Paniagua Javier 870484665b 2009-02-19 Gonzalo Paniagua Javier <[email protected]>
* OleDbFactory.cs: New file.


svn path=/trunk/mcs/; revision=127374
2009-02-19 06:47:31 +00:00
Veerapuram Varadhan fd5ac5b3ed TDS 8 changes
svn path=/trunk/mcs/; revision=125333
2009-02-02 11:05:18 +00:00
Veerapuram Varadhan b814b2bb89 TDS 8 Changes
svn path=/trunk/mcs/; revision=125324
2009-02-02 09:26:36 +00:00
Veerapuram Varadhan 15c2751851 TDS 8 changes
svn path=/trunk/mcs/; revision=125323
2009-02-02 09:24:39 +00:00
Veerapuram Varadhan 029b857515 TDS 8 changes
svn path=/trunk/mcs/; revision=125322
2009-02-02 09:23:17 +00:00
Veerapuram Varadhan e62e0f62e5 TDS 8 changes
svn path=/trunk/mcs/; revision=125321
2009-02-02 09:13:24 +00:00
Gert Driesen 78a4d7dc71 * SqlCommandTest.cs: Added test for bug #470579.
svn path=/trunk/mcs/; revision=124992
2009-01-29 19:10:44 +00:00
Gonzalo Paniagua Javier c0ac3b7e2d Improved TDS connection pooling
svn path=/trunk/mcs/; revision=124408
2009-01-24 05:55:52 +00:00
Gert Driesen 8c27be40e5 * OdbcDataReader.cs: Fixed GetBytes with limited length. Added reader
state and argument checks.

svn path=/trunk/mcs/; revision=123751
2009-01-18 21:09:06 +00:00
Gert Driesen 4efbca7c6d * DataReaderTest.cs: Added indexer tests. Added/improved GetBytes
tests.
* IDbCommandTest.cs: Added test for ExecuteReader with CommandText
that is not initialized. Improved ExecuteScalar test.

svn path=/trunk/mcs/; revision=123750
2009-01-18 21:06:07 +00:00
Gert Driesen 83d1a204fa * OdbcCommand.cs: Do not allow negative CommandTimeout. Reject invalid
value for CommandType and UpdatedRowSource. In Dispose, clear
CommandText (2.0 only) and Parameters. Include method that is being
executed in the exception messages for Connection and CommandText
verification.
* OdbcCommandTest.cs: Added tests for CommandTimeout,
UpdatedRowSource, Dispose and ResetCommandTimeout. Added
ExecuteNonQuery/ExecuteReader/ExecuteScalar tests for a connection
that is not initialized or closed.

svn path=/trunk/mcs/; revision=123742
2009-01-18 17:38:35 +00:00
Gert Driesen a8a338ba57 Added input param to sp_326182b.
svn path=/trunk/mcs/; revision=123717
2009-01-17 22:40:06 +00:00
Gert Driesen 7ecb22b4dd * SqlCommandBuilderTest.cs: Improved DeriveParameters test.
* SqlCommandTest.cs: Added InputOutput parameter to
StoredProc_ParameterTest.

svn path=/trunk/mcs/; revision=123716
2009-01-17 22:39:14 +00:00
Gert Driesen 0a1a4828a1 * SqlParameter.cs: Renamed isDirty to typeChanged; it is now now only
used to indicate whether the type of the parameter has been updated.
Changed signature of 'updated' argument in GetFrameworkValue to ref
to match delegate in Mono.Data.Tds, and convert value if either the
type has been changed or if the 'updated' argument is true (which -
for now - means the value or size changed in TdsMetaParameter).
Various fixes for derived parameters:
- parameter_type 2 means InputOutput parameter, while 3 means Output;
- Only set precision and scale is type is decimal.
- When type has variable size, then also set Size.

svn path=/trunk/mcs/; revision=123705
2009-01-17 20:12:24 +00:00
Gert Driesen 416d711c89 Added sp with mix of input and output parameters.
svn path=/trunk/mcs/; revision=123675
2009-01-17 00:46:00 +00:00
Gert Driesen b49af57c79 Improved test for DeriveParameters.
svn path=/trunk/mcs/; revision=123674
2009-01-17 00:45:35 +00:00
Gert Driesen 42d7ff0754 Use existing sp for testing bug326182.
svn path=/trunk/mcs/; revision=123671
2009-01-16 23:42:44 +00:00
Gert Driesen 0886e7d542 Improve test to also cover specifying value in .ctor.
svn path=/trunk/mcs/; revision=123668
2009-01-16 23:25:28 +00:00
Atsushi Eno 2571e8fa43 2009-01-16 Atsushi Enomoto <[email protected]>
* DataColumnTest.cs : try a string comparison fix.


svn path=/trunk/mcs/; revision=123557
2009-01-16 00:50:33 +00:00
Raja R Harinath 2c3d3c3c42 * DataRelationCollection.cs (BinarySerialize): New. Carved out of ...
* DataSet.cs (BinarySerialize): ... this.

svn path=/trunk/mcs/; revision=122412
2009-01-05 07:32:17 +00:00
Raja R Harinath 95fc061ac6 * DataRelationCollection.cs: Sequester NET_2_0 and NET_1_1 specific code into separate parts.
svn path=/trunk/mcs/; revision=122411
2009-01-05 07:31:45 +00:00
Raja R Harinath c5306b4ddc Move DataSet.Tables serialization to DataTableCollection
* DataTableCollection.cs (BinarySerialize_Schema): New.
(BinarySerialize_Data): Likewise.  Carved out of ...
* DataSet.cs (BinarySerialize): ... this.

svn path=/trunk/mcs/; revision=122410
2009-01-05 07:31:20 +00:00
Raja R Harinath 3a1b121b33 * DataTableCollection.cs: Sequester NET_2_0 and NET_1_1 specific code into separate parts.
svn path=/trunk/mcs/; revision=122409
2009-01-05 07:30:49 +00:00
Gert Driesen 2188d2883c * DataReaderTest.cs: Added tests for GetValue. Improved test
for GetBytes.

svn path=/trunk/mcs/; revision=122399
2009-01-04 21:47:09 +00:00
Gert Driesen a2589359cd * SqlCommandBuilderTest.cs: Improved tests to also check
behavior of RefreshSchema.
* SqlDataReaderTest.cs: Added tests for GetBytes.

svn path=/trunk/mcs/; revision=122398
2009-01-04 21:45:09 +00:00
Gert Driesen e3c0d4579c * SqlDataReader.cs: Added GetSchemaRowDbType overload for
getting sql type of a given column (identified using its
ordinal). Modified GetBytes to throw SqlNullValueException
(2.0 profile) or return 0 (1.0 profile) when reading bytes
sequentially. Added support for non-sequentially reading
text and ntext columns using GetBytes. Modified GetChar
to throw a NotSupportedException to match MS.

svn path=/trunk/mcs/; revision=122396
2009-01-04 21:38:09 +00:00
Gert Driesen e9afd5d74d * SqlCommandBuilder.cs (RefreshSchema): Clear commands.
svn path=/trunk/mcs/; revision=122395
2009-01-04 20:55:09 +00:00
Gert Driesen a7331a74c3 * DataReaderTest.cs: Added tests for GetChars, GetOrdinal,
GetValue and GetValues. Improved existing tests.
* DbDataReaderTest.cs: Moved GetProviderSpecificValue test
to provider specific tests (as its behavior differs between
Odbc and SqlClient). Removed unused property.

svn path=/trunk/mcs/; revision=122384
2009-01-03 23:33:20 +00:00
Gert Driesen 8a6bd370d1 Save as UTF-8.
svn path=/trunk/mcs/; revision=122383
2009-01-03 23:27:27 +00:00
Gert Driesen 37d01cae34 * SqlCommandBuilderTest.cs: Improve Get*Command tests.
* SqlCommandTest.cs: Fixed warning.
* SqlConnectionTest.cs: Removed unused property.
* SqlDataReaderTest.cs: Enabled GetChars test on 1.0
profile. Added GetValues test. Added and improved
GetSqlValue tests. Improved HasRows and NextResult
tests. Added GetFieldType tests. Added big batch of
schema-related tests.
* SqlParameterTest.cs: Moved disconnected tests to
System.Data test suite. Improved test for bug
#382635. Added test for failed conversion to SQL type.


svn path=/trunk/mcs/; revision=122382
2009-01-03 23:24:47 +00:00
Gert Driesen 1e50a2325f * SqlDataReader.cs: Removed unused dataTypeNames, and
unnecessary initializations. Added missing reader state
and row state checks. Fixed implementation of HasRows.
Modified type of DataType to object on 1.0 profile for
compatibility with .NET 1.x. Do not mark (Big)VarBinary
or ((Big)Binary as long, as unit tests show that IsLong
is for wide (unicode) data types. Fixed type data for
SmallDateTime and SmallMoney data types. Improved support
for bigint data type (using TDS 7.0).

svn path=/trunk/mcs/; revision=122381
2009-01-03 23:07:06 +00:00
Gert Driesen 55a3f19733 * SqlCommand.cs: Moved connection reset before the throw.
Improved exception message.

svn path=/trunk/mcs/; revision=122380
2009-01-03 22:59:29 +00:00
Gert Driesen 9ec8751239 * SqlCommandBuilder.cs: Only set SourceColumn for null check
parameters on the 2.0 profile, and set SourceVersion to
Current on 1.0 profile. Changed accessibility of RefreshSchema
to public, and do not immediately create commands. Removed
CWL.

svn path=/trunk/mcs/; revision=122379
2009-01-03 22:55:09 +00:00
Gert Driesen 7c73fb19d6 * SqlParameterTest.cs: Added .ctor tests. Improved
ParameterType and ResetDbType tests. Added ParameterName,
SourceColumn and Value tests. Partially enable SqlValue
test.

svn path=/trunk/mcs/; revision=122378
2009-01-03 22:48:07 +00:00
Gert Driesen 83cff6650f * SqlParameter.cs: When setting ParameterName or sourceName to
null, use a zero-length string instead. On 1.0 profile, only
infer type from value if value is not null or DBNull. Store
raw value in TdsMetadataParameter, and use delegate to convert
it to framework type (when necessary). Improve implementation
of SqlValue (still needs lots of work).

svn path=/trunk/mcs/; revision=122376
2009-01-03 22:40:34 +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
Ivan Zlatev 65b7926385 2009-01-02 Ivan N. Zlatev <[email protected]>
* DataViewManager.cs: Implement all MonoTODO. Fixes the WinForms
	DataBinding unit tests.

svn path=/trunk/mcs/; revision=122333
2009-01-02 13:27:10 +00:00
Ivan Zlatev 016e720dee 2009-01-01 Ivan N. Zlatev <[email protected]>
* DataViewManager.cs: Hookup to the table/relations changed events and
	raise ListChanged events accordingly.

svn path=/trunk/mcs/; revision=122315
2009-01-01 18:46:02 +00:00
Gert Driesen 25c01a2252 * app-default.config: Renamed to app-net_1_1.config, and added
providerTests section.
* app-net_2.0.config: Added providerTests section and removed
mono.data section.
* Makefile: Added support for CONNECTION variable and corresponding
PROVIDER_TESTS_CONNECTION environment variable. Always rebuild test
assembly since we have no dependency check for sources in place.
Only add reference to Mono.Data on 1.1 profile. Added reference to
System.Configuration on 2.0 profile.
* sqlserver.config: Merged into app-*.config.
* odbc.config: Merged into app-*.config.
* System.Data.Connected.Tests.dll.sources: Added ConnectionConfig.cs,
EngineConfig.cs, EngineType.cs, ProviderTestsConfigurationHandler.cs
and DbDataReaderTest.cs. Removed OdbcConnectionStringBuilderTest.cs.
* ConnectionConfig.cs:  Holds information on a specific connection and
corresponding engine to test.
* EngineConfig.cs: Holds information on the capabilities and behavior
of an RDBMS engine.
* EngineType.cs: Defines different database engines supported by the
provider tests.
* ConnectionManager.cs: Use DbProviderFactory and DbConnection
on 2.0 profile. Added support for new Connection/Engine configuration.
* ProviderTestsConfigurationHandler.cs: IConfigurationSectionHandler
for the ProviderTests section.
* DataReaderTest.cs: Added tests that were previously part of
SqlClient tests but apply to all families. Improved existing
tests.
* DbDataReaderTest.cs: Added GetProviderSpecificValues error check
 tests.
* IDbCommandTest.cs: Added ExecuteNonQuery tests for empty CommandText.
Added test for bug #462947.
* OdbcCommandBuilderTest.cs: Improved GetDeleteCommand,
GetInsertCommand and GetUpdateCommand tests. Added QuotePrefix,
QuoteSuffix and QuoteIdentifier tests.
* OdbcCommandTest.cs: Improved existing tests. Added
ExecuteNonQuery and Dispose tests.
* OdbcConnectionStringBuilderTest.cs: Moved to System.Data
test suite.
* OdbcDataAdapterTest.cs: Removed extra whitespace.
* OdbcDataReaderTest.cs: Added GetBytes and GetSchemaTable
tests.
* OdbcParameterCollectionTest.cs: Improve existing tests.
* OdbcParameterTest.cs: Added tests for several data types.
* SqlCommandBuilderTest.cs: Improve Get*Command tests.
* SqlCommandTest.cs: Added test for bug #341743. Added test
for connection state after executing invalid SQL. Improved
stored procedure test to check behavior with and without
leading '@' for parameter names. Minor formatting changes.
* SqlConnectionTest.cs: Split up connection string errors
test.
* SqlDataReaderTest.cs: Improved GetInt64Test. Improved and
added GetBytes tests. Added GetSqlValues and HasRows tests.
Added GetSchemaTable test. Improved GetProviderSpecificFieldType
tests.
* SqlParameterTest.cs: Improved ParameterType test. Added
type inferrence tests.
* SqlTransactionTest.cs: Allow not working tests to run on MS.
* MySQL_5.sql: Added numeric and decimal colums with different
precision and scale. Added more rows to binary_family. Added
nchar and nvarchar columns to string_family, and added extra
data. Added time and date columns to datetime_family.
* sqlserver.sql: Added numeric and decimal colums with different
precision and scale. Added timestamp column and more rows to
binary_family. Added nchar and nvarchar columns to string_family,
and added extra data. Added sp_326182 stored procedure.
* sybase.sql: Added more rows to binary_family.

svn path=/trunk/mcs/; revision=122297
2008-12-31 15:35:07 +00:00
Gert Driesen 39a234d167 * SqlConnectionTest.cs: Improve Database test.
svn path=/trunk/mcs/; revision=122270
2008-12-30 21:24:56 +00:00
Gert Driesen f0571296c3 * DBConcurrencyException.cs: Marked .ctor taking DataRow [] as
internal so we can use it on the 1.0 profile (internally). Implemented
RowCount.
* System.Data_test.dll.sources: Added DBConcurrencyExceptionTest.cs.
* DBConcurrencyExceptionTest.cs: Added .ctor and Row(Count) tests.

svn path=/trunk/mcs/; revision=122263
2008-12-30 19:58:45 +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 021e47b486 * SqlXmlTest.cs: Minor improvements to tests. Marked tests as
NotWorking/NotDotNet to fix test failures on MS.

svn path=/trunk/mcs/; revision=122231
2008-12-30 10:29:34 +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