Does jrdc2 Can Rollback Transaction if lost connection to MySQL Database from VPS Server ? (Not localhost)
I already search in this forum and sorry i can't find. i found executebatch method but it was not my requirement.
I can make transaction safely with the following code with C#.
The CRUD Operation not damage my data Even If my VPS Server down.
//Insert the person database with some data.
myCommand.CommandText = "INSERT INTO person_withdrawl(person_id,withdrawl_amount)VALUES("
+ Convert.ToInt32(lbl_PersonID.Text.Trim()) + ","
+ Convert.ToString(txt_WithDrawl_Amount.Text.Trim()) + ")";
myCommand.ExecuteNonQuery();
//Insert is Completed.
// Then I Update another Corresponding Table
myCommand.CommandText = "UPDATE person SET "
+ "cash_amount=cash_amount-" + Convert.ToInt32(txt_WithDrawl_Amount.Text.Trim()) + "";
myCommand.ExecuteNonQuery();
//If above are going well. I commit it.
myTrans.Commit();
// if something wrong (e.g - connection down ... Nothing damaged! Try Again Safely)
I want to do like with B4A. Can anyone Point me out this ? Thank you all.