Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 Transactions not Commited or Rollbaked

closed
nobody
None
5
2002-11-27
2002-11-20
Vincent Daron
No

Hello again
You create the command but you did'nt execute it !

public void Commit()
{
if(Conn!=null)
{
new MySQLCommand("COMMIT",Conn);
}
}

Discussion

  • Logged In: YES
    user_id=406263

    Can you explain it too much?

    It will be grat a big piece of code.

    Note: The transaction system has not benn tested by now.

     
  • Vincent Daron
    Vincent Daron
    2002-11-23

    Logged In: YES
    user_id=614068

    Simply, int MySQLDriverCS :

    for Commit

    public void Commit()
    {
    if(Conn!=null)
    {
    MySQLCommand cmd = new MySQLCommand
    ("COMMIT",Conn);
    cmd.ExecuteNonQuery();
    }
    }

    And for Rollback

    public void Rollback()
    {
    if(Conn!=null)
    {
    MySQLCommand cmd = new MySQLCommand
    ("ROLLBACK",Conn);
    cmd.ExecuteNonQuery();
    }
    }

    I've made some tests and it seems work ok

     
  • Vincent Daron
    Vincent Daron
    2002-11-23

    Logged In: YES
    user_id=614068

    Sorry in MySQLTransaction.cs of course ;-)

     
  • Logged In: YES
    user_id=406263

    Bugfixed in 3.0.5 version

     
  • Logged In: YES
    user_id=406263

    Bugfixed in 3.0.5 version

     
    • status: open --> closed