Menu

#13 Transactions not working

open
None
5
2004-12-30
2004-12-28
Anonymous
No

Hello from Barcelona!

I think there's a bug in the AdpCommand constructor
that prevents transactions to work properly.

The constructor that works is :

/// <summary>
/// Initializes a new instance of the <see
cref='AdpCommand'/> class with the text of the query,
/// a <see cref='AdpConnection'/> and a <see
cref='AdpTransaction'/>.
/// </summary>
/// <param name="cmdText">A Transact-SQL statement or
stored procedure name to execute.</param>
/// <param name="connection">The <see
cref='AdpConnection'/> used by this instance of the
<see cref='AdpCommand'/>.</param>
/// <param name="transaction">The <see
cref='AdpTransaction'/> within which the <see
cref='AdpCommand'/> executes.</param>
public AdpCommand(string cmdText, AdpConnection
connection, AdpTransaction transaction)
{
this.Connection = connection;
this.Transaction = transaction;
this.CommandText = cmdText;
}

Note that I use "this.Connection" not
"this.connection" and "this.Transaction" not
"this.transaction" to initialize the variables properly.

"Obrigado" for the piece of software!!

Discussion

  • Everaldo Canuto

    Everaldo Canuto - 2004-12-30
    • assigned_to: nobody --> everaldo_canuto
     
  • Everaldo Canuto

    Everaldo Canuto - 2004-12-30

    Logged In: YES
    user_id=1085204

    Thanks, I will fix it today.

    Everaldo.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.