#2 Transactions not Commited or Rollbaked

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

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

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

Discussion

  • Manuel Lucas Viñas Livschitz

    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 ;-)

     
  • Manuel Lucas Viñas Livschitz

    Logged In: YES
    user_id=406263

    Bugfixed in 3.0.5 version

     
  • Manuel Lucas Viñas Livschitz

    Logged In: YES
    user_id=406263

    Bugfixed in 3.0.5 version

     
  • Manuel Lucas Viñas Livschitz

    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks