SqlTransaction.cs - Check if the connection is still active before trying to rollback during Dispose. A loss of a connection is possible which result in an exception that will lead to the closing of the session. This will result in the dispose methods being invoked and if there was an active transaction then a rollback will be attempted. However, if the connection is gone we'll end up raising further exceptions about resources already being disposed.
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
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
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
* 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
* SqlTransaction.cs (Dispose): Fixed compliation warning.
* SqlDataReader.cs (GetValues): Length of elements to be copied was
decided based on the argument array passed, which caused a bug, if
the length of given array is more than actual column values.
* SqlCommandBuilder.cs (CatalogSeparator, SchemaSeparator)
(CatalogLocation): Implemented missing properties.
(CreateDeleteCommand, CreateInsertCommand, CreateUpdateCommand):
Modified private methods to take bool flag. If true, add actual
parameter name instead of p1, p2 etc.
(CreateParameter): Added overloaded private method to create
parameter with the actual column name.
(GetUpdateCommand, GetDeleteCommand, GetInsertCommand):
Implemented missing overloaded methods.
(SetRowUpdatingHandler): Implemented missing protected method.
* SqlCommand.cs: Fixed compilation warning. Removed bogus
MonoTODO's.
svn path=/trunk/mcs/; revision=70619
These changes are for 2.0 profile only. These changes implement
the generic data base access technique using Provider Factory
Implementation. These classes need to be dervided from abstract
base classes so that the corresponding factory classes are
created when calling CreateCommand, CreateParameter, etc.
* SqlClientFactory.cs: Provider Factory class Implementaion for SqlServer
* SqlParameter.cs: Change base classes and override methods.
* SqlParameterCollection.cs: Change base classes and override methods.
* SqlTransaction.cs: Change base classes and override methods.
* SqlDataSourceEnumerator.cs: DataSource Enumerator stubs.
* SqlDataReader.cs: Change base classes and override methods.
* SqlConnection.cs: Change base classes and override methods.
* SqlCommandBuilder.cs: Change base classes and override methods.
* SqlCommand.cs: Change base classes and override necessary methods.
svn path=/trunk/mcs/; revision=36527
* System.Data.SqlClient/SqlCommand.cs:
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlDataReader.cs:
* System.Data.SqlClient/SqlParameter.cs:
* System.Data.SqlClient/SqlParameterCollection.cs:
* System.Data.SqlClient/SqlTransaction.cs:
Many changes around restructuring of parameter
information so that the Sybase provider supports
PREPAREs too.
svn path=/trunk/mcs/; revision=9193
* list:
Add new internal tds classes
* System.Data.Common/DbDataAdapter.cs:
* System.Data.SqlClient/SqlDataAdapter.cs:
Change event calling system
* System.Data.SqlClient/SqlClientPermission.cs:
* System.Data.SqlClient/SqlClientPermissionAttribute.cs:
* System.Data.SqlClient/SqlDataReader.cs:
Add comments
* System.Data.SqlClient/SqlCommand.cs:
Some changes to make consistent with .NET based on Sql server traces
Implement command timeout
* System.Data.SqlClient/SqlCommandBuilder.cs:
Make sure that we only build a command if key info found
* System.Data.SqlClient/SqlConnection.cs:
Change event calling system
Some changes to make consistent with .NET based on Sql server traces
Implement connection timeout
* System.Data.SqlClient/SqlConnectionPool.cs:
Implement connection timeout
* System.Data.SqlClient/SqlError.cs:
Implement ToString ()
* System.Data.SqlClient/SqlException.cs:
Mucho implementation and cleanup
* System.Data.SqlClient/SqlParameter.cs:
Implement Clone ()
* System.Data.SqlClient/SqlParameterCollection.cs:
Code cleanup
* System.Data.SqlClient/SqlTransaction.cs:
Move some of the transaction creation to SqlConnection to be consistent
with .NET SQL traces
svn path=/trunk/mcs/; revision=8906
* System.Data/DataRow.cs:
* System.Data/DataTable.cs:
Some fix-ups related to the DbDataAdapter to make it work.
* System.Data.Common/DbDataAdapter.cs:
Fix the Fill () and Update () methods. These now work
fairly well. Need mucho testing.
* System.Data.SqlClient/SqlCommandBuilder.cs:
Support table mappings and parameter source versions now.
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlTransaction.cs:
Add set accessor for transaction so that SqlTransaction.Commit ()
will remove itself from the connection.
* System.Data.SqlClient/SqlDataAdapter.cs:
Update/Insert/Delete command should be null by default.
* System.Data.SqlClient/SqlException.cs:
Remove a TODO attribute
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs:
Properly handle the SqlCommand object
svn path=/trunk/mcs/; revision=8889
* System.Data.Common/FieldNameLookup.cs:
* System.Data.Common/SchemaInfo.cs:
* System.Data.SqlClient/SqlXmlTextReader.cs:
New classes added
* list :
Class list changed in build
* System.Data.SqlClient/SqlCommand.cs:
Added support for command behaviors
Refactored a bunch of code
Implement ExecuteScalar
Implement ExecuteXmlReader
* System.Data.SqlClient/SqlConnection.cs:
Moved CheckForErrors here
* System.Data.SqlClient/SqlDataAdapter.cs:
Code reformatting
* System.Data.SqlClient/SqlDataReader.cs:
Implement GetEnumerator
Fix NextResult, Read
Add SqlDataReaderEnumerator private class
* System.Data.SqlClient/SqlParameter.cs:
Move some of the Prepare code from SqlCommand to here
* System.Data.SqlClient/SqlTransaction.cs:
Move error checking to SqlConnection
svn path=/trunk/mcs/; revision=8703
* System.Data.SqlClient/SqlConnectionPool.cs:
New class added
* System.Data.SqlClient/SqlClientPermission.cs:
* System.Data.SqlClient/SqlClientPermissionAttribute.cs:
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs:
* System.Data.SqlClient/SqlInfoMessageEventHandler.cs:
* System.Data.SqlClient/SqlParameter.cs:
* System.Data.SqlClient/SqlParameterCollection.cs:
Code reformatting
* System.Data.SqlClient/SqlCommand.cs:
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlException.cs:
* System.Data.SqlClient/SqlTransaction.cs:
New code based on work in TDS Client
* list:
New files added for SqlClient, and TdsClient.Internal
* System.Data.build:
Added reference to System.EnterpriseServices.dll
Still leave SqlClient out of build until danmorg
can fix.
svn path=/trunk/mcs/; revision=8552
* Test/TestSqlInsert.cs: modified - do
a SQL DELETE before SQL INSERT of row so you can use this
test over and over.
* System.Data.SqlClient/SqlTransaction.cs: modified - default
IsolationLevel for PostgreSQL is ReadCommitted. However,
PostgreSQL allows Serializable as well.
(Thanks to Gonzalo for that!)
* System.Data.SqlClient/SqlConnection.cs: modified
* System.Data.SqlClient/SqlCommand.cs: modified
* System.Data.SqlClient/SqlTransaction.cs: modified - got transactions
working; however, we still need to implement SQL errors
and exceptions to properly handle transactions. Also, added
status and error message support from the PostgreSQL database.
Currently, this does a Console.WriteLine() to display the
status and error messages, but this is a TODO
for SQL errors and exceptions.
* System.Data/TODOAttribute.cs: added - needed MonoTODO
attribute for System.Data.dll assembly
* System.Data/IDbCommand.cs: modified - commented
overloaded method ExecuteReader
so System.Data.SqlClient.SqlCommand can compile
* System.Data/IDbCommand.cs: modified
* System.Data/IDbConnection.cs: modified - added using System;
* System.Data/IDataParameter.cs
* System.Data.build: modified - build classes
in System.Data.SqlClient and exclude others in System.Data
* System.Data.SqlClient/PostgresLibrary.cs: modified - change
parameter data type from IntPtr to enum ExecStatusType
* ChangeLog: modified - corrected previous entries in log
svn path=/trunk/mcs/; revision=3874
* System.Data.SqlClient/PostgresLibrary.cs: new internal class, which
contains all calls the the PostgreSQL client library, to be used
everywhere in System.Data.SqlClient.
svn path=/trunk/mcs/; revision=3804
* System.Data.SqlClient/*: added skeletons for the SQL managed
provider for ADO.Net, to be based initially in PostgreSQL.
svn path=/trunk/mcs/; revision=3300