>* set transactions on >SQLSETPROP(oConn,"Transactions",2) && ATTENTION, this have a bug, if a transaction is open a disconnect do a commit >BEGIN TRAN >DO CASE > CASE NOT ThisForm.SaveData() > SQLROLLBACK(oConn) && IF THIS FAIL ? what do you do ? > ROLLBACK > CASE SQLCOMMIT(oConn) < 0 > AERROR(aer) > MESSAGEBOX(aer[2]) > SQLROLLBACK(oConn) > ROLLBACK > OTHERWISE > END TRAN > WAIT WINDOW NOWAIT "Data has been updated" >ENDCASE >* set transactions off >SQLSETPROP(oConn,"Transactions",1) && ATTENTION, if a transaction is open this do a commit >