From: Carlos G.A. <car...@te...> - 2003-02-28 23:37:42
|
Hello: myConnection.Close() make a Rollback of the transaction, try with this: myConnectionString = "Database=C:\\interbase\\Usertasks\\xxx.GDB;User=xxx;Password=xxx;Dialect=3;Server=xxx" myConnection = new FbConnection(myConnectionString) myConnection.Open() Dim UpdateCmd As String Updatecmd = "UPDATE users SET fname = 'Andrew' WHERE userid = " & txtuserid.Value myTxn = myConnection.BeginTransaction() MyCommand = New FbCommand(updateCmd, MyConnection, myTxn) Try MyCommand.ExecuteNonQuery() Message.Style("color") = "Green" Message.InnerHtml = "<b>Account has been updated.</b><br>" myTxn.Commit() Catch Exp As FbException Message.Style("color") = "red" Message.InnerHtml = "ERROR: Could not update Account: <br>" & Exp.Message myConnection.Close() End Try myConnection.Close() |