* SqlParameterCollection.cs: this [int] must check the range and
throw an exception if necessary.
* SqlCommand.cs: throw IOEX when stored procedure is not found in
DeriveParameters. All procedures in MS SQL will report at least
one parameter - the return value.
svn path=/trunk/mcs/; revision=105657
match MS. Code formatting.
* SqlCommand.cs: Changed argument names to match MS. Code formatting.
Do not include explicit IDbCommand implementation on 2.0 profile.
* SqlCommandBuilder.cs: Changed argument names to match MS. Code
formatting.
* SqlDataReader.cs: Changed argument names to match MS. Code
formatting.
* SqlParameterCollection.cs: Do not include IList, ICollection and
IDataParameterCollection explicit interface implementation on 2.0
profile. Code formatting.
* SqlConnection.cs: Changed argument names to match MS.
* SqlDataAdapter.cs: Changed argument names to match MS.
* SqlTransaction.cs: Do not include explicit interface implementation
of IDbTransaction.Connection on 2.0 profile. Code formatting.
svn path=/trunk/mcs/; revision=101355
2008-04-19 Robert Jordan <[email protected]>
* SqlCommandTest.cs: Add test case for bug #381100.
In System.Data.SqlClient:
2008-04-19 Robert Jordan <[email protected]>
* SqlParameterCollection.cs (AddRange(SqlParameter[])):
Fix endless recursion.
svn path=/trunk/mcs/; revision=101212
* SqlConnection.cs: TCP port discovery via UDP port 1434 should
honor the timeout specified in the connection string (or the
default one). In some environments 100 microseconds might not be
enough to discover the port.
svn path=/trunk/mcs/; revision=100077
* SqlParameter.cs: ConvertToFrameworkType must handle empty
strings gracefully - a DBNull.Value must be returned in this
case.
* SqlCommand.cs: DeriveParameters should split the stored
procedure name into the schema name and procedure name before
querying its parameters.
svn path=/trunk/mcs/; revision=99553
* System.Data.dll.sources: Add new OleDbMetaDataCollectionNames.cs
* System.Data_test.dll.sources: Add the new OdbcMetaDataColumnNamesTest,
OleDbMetaDataCollectionNamesTest and SqlClientMetaDataCollectionNamesTest.
In class/System.Data/System.Data.Odbc:
* OdbcMetaDataCollectionNames.cs: Set the field values.
In class/System.Data/System.Data.OleDb:
* OleDbMetaDataCollectionNames.cs: New.
In class/System.Data/System.Data.SqlClient:
* SqlClientMetaDataCollectionNames.cs: Set the field values.
In class/System.Data/Test/System.Data.Odbc:
* OdbcMetaDataCollectionNamesTest.cs: New.
In class/System.Data/Test/System.Data.OleDb:
* OleDbMetaDataCollectionNamesTest.cs: New.
In class/System.Data/Test/System.Data.SqlClient:
* SqlClientMetaDataCollectionNamesTest.cs: New.
svn path=/trunk/mcs/; revision=97175
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
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
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
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
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
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
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
* SqlCommand.cs, SqlDataReader.cs, SqlConnection.cs: When the
server resets the connection, now the client code also disconnects
the session and remove the instance from pool. Fixes bug # 81933.
svn path=/trunk/mcs/; revision=83522
* SqlCommand.cs (Transaction, Connection): IDbCommand Transaction
and Connection can be set to null. Fixes bug 82189.
svn path=/trunk/mcs/; revision=83059
* SqlClientFactory.cs: Use SqlDataSourceEnumerator from S.D.Sql and
marked method todo. Avoid unnessary casts. Code formatting.
* SqlCommand.cs: Explicit interface implementation of IDbCommand not
necessary on 2.0 profile. Fixes API mismatches. Avoid unnecessary
casts. Code formatting.
* SqlConnection.cs: Also use RecommendAsConfigurable instead of
SettingBindableAttribute on 2.0. Use StateChange event from base class
on 2.0. Only explicitly implement IDbConnection methods on 1.0, since
these are implemented by base class on 2.0 profile. Removed extra
explicit implementation of IDisposable since the base class implements
this. Code formatting.
* SqlDataAdapter.cs: Dispose (bool) override not necessary on 2.0
profile. Stubbed ICloneable.Clone. Fixes API mismatches.
* SqlDataReader.cs: On 2.0, IDisposable.Dispose is implemented by
DbDataReader. Only 1.0 profile, explicitly implemented IEnumerable
GetEnumerator. Code formatting.
* SqlDataSourceEnumerator.cs: Removed.
* SQLDebugging.cs: Marked sealed on 2.0. Code formatting.
* SqlNotificationAuthType.cs: Removed.
* SqlNotificationInfo.cs: Added missing fields. Code formatting.
* SqlNotificationSource.cs: Added missing fields. Code formatting.
* SqlNotificationTransports.cs: Removed.
* SqlNotificationType.cs: Added missing Unknown field. Code formatting.
* SqlParameter.cs: Removed Browsable and EditorBrowsable attributes
from Precision and Scale. Fixes API mismatches. Code formatting fixes.
* SqlTransaction.cs: On 2.0 profile, Dispose method is exposed by
base class. Fixes API mismatches. Code formatting fixes.
* System.Data.dll.sources: Removed ISqlNotificationReceiver.cs,
SqlDataSourceEnumerator.cs, SqlNotificationAuthType.cs,
SqlNotificationTransports.cs.
svn path=/trunk/mcs/; revision=81134
* SqlCommand.cs, SqlConnectionStringBuilder.cs, SqlConnection.cs:
Fixed 1.0 and 2.0 extras, errors as stated in class status page.
* SqlDataAdapter.cs, SqlParameter.cs:Fixed 1.0 and 2.0 extras,
errors as stated in class status page.
* SqlBulkCopyColumnMappingCollection.cs: Fixed 1.0 and 2.0 extras,
errors as stated in class status page.
svn path=/trunk/mcs/; revision=78717
* SqlParameter.cs (SqlParameter): Updated constructor to use the
new TDS RPC implementation.
Fixed missing attributes.
(SetDbType): Added new case for sql_variant type.
(ConvertToFrameworkType): Implemented new private method to
convert the data type to framework type.
* SqlParameterCollection.cs: Fixed missing attributes and
implemented missing methods.
* SqlConnection.cs: Fixed missing attributes.
* SqlConnectionStringBuilder.cs: Certain attributes are missing or
its value or they are not appropriate. Fixed them.
* SqlDataReader.cs (GetData): Method is available only under 1.0
profile.
* SqlCommandBuilder.cs: Certain attributes are available only
under 2.0 profile, so moved them inside ifdef.
* SqlCommand.cs: Certain attributes are available only under 2.0
profile, so moved them inside ifdef.
svn path=/trunk/mcs/; revision=78186
* SqlClientFactory.cs: Added two using directives.
(CreateConnectionStringBuilder): Implemented the method.
(CreatePermission): Implemented the property.
* SqlCommand.cs: Added one using directive.
(Clone): Implemented the method.
(Dispose): Implemented the method.
(BeginExecuteXmlReader): Implemented the method.
* SqlCommandBuilder.cs (QuoteIdentifier): Implemented the method.
(UnquoteIdentifier): Implemented the method.
* SqlConnection.cs (ChangePassword): Implemented the method.
2007-03-19 Nidhi Rawal <[email protected]>
* SqlClientFactory.cs (CanCreateDataSourceEnumerator): Implemented
the property.
* SqlCommand.cs (Notification): Implemented the property.
(NotificationAutoEnlist): Implemented the property.
* SqlDataReader.cs (VisibleFieldCount): Implemented the property.
* SqlConnectionStringBuilder.cs (TrustServerCertificate): Implemented
the property.
(TypeSystemVersion): Implemented the property.
(UserInstance): Implemented the property.
(ContextConnection): Implemented the property.
* SqlConnection.cs (FireInfoMessageEventOnUserErrors): Implemented
the property.
(StatisticsEnabled): Implemented the property.
* SqlDataAdapter.cs (UpdateBatchSize): Implemented the property.
* SqlParameter.cs: Implemented one attribute.
svn path=/trunk/mcs/; revision=75189
* SqlParameter.cs: Move isVariableSizeType flag to TdsMetaParameter
so that the TdsMetaParameter can validate itself for valid size / values.
* SqlCommand.cs (Execute): Call Validate on TdsMetaParameter.
* TdsMetaParameter.cs: Add Validate() method. For now, validate
size/value. Add isVariableSizeType.
* SqlCommandTest.cs: Add OutputParamSizeTest1-4 to test size/value
validation exception.
svn path=/trunk/mcs/; revision=74500
* SqlCommand.cs (CommandType): Exception type thrown in 2.0
profile is different than 1.0, ArgumentOutOfRangeException.
(Connection): Exception type thrown in 2.0 profile is different
than 1.0, ArgumentOutOfRangeException.
(Execute): If Size property is 0 for String and Binary type, then
throw InvalidOperationException.
(ValidateCommand): Exception type thrown in 2.0 profile is
different than 1.0, NullReferenceException.
svn path=/trunk/mcs/; revision=74232
* SqlCommand.cs (ExecuteScalar): Fix returned value for
stored procedure calls to return the first column of the
first row produced by the proc.
* SqlCommandTest.cs: Add parameterized stored procedure call tests
to ExecuteScalar and ExecuteNonQuery.
svn path=/trunk/mcs/; revision=73982