>use v_fldmon1 >=cursorsetprop("buffering",5,"v_fldmon1") >*!* Remote view v_fldmon1 is empty >select 0 >use v_fldmon2 >=cursorsetprop("buffering",5,"v_fldmon2") >*!* Remote view v_fldmon2 is empty > >select v_fldmon1 >*!* insert a good record into v_fldmon1 >append blank >gather memvar >*!* Remote view v_fldmon1 now has 1 record not yet updated. > >*!* cause an error that will prevent update of second RV >select v_fldmon2 >append blank >gather memvar >replace fldmon2id with .null. >*!* Primary key set to .null. - this will cause the second view fail on tableupdate >*!* Remote view v_fldmon2 has 1 record with an error to prevent update for testing > >begin transaction >if tableupdate(1,.t.,"v_fldmon1") .and. tableupdate(1,.t.,"v_fldmon2") > *!* both remote views updated correctly > end transaction >else > *!* one or both remote views failed to update underlying tables > rollback > =tablerevert(.t.,"v_fldmon1") > =tablerevert(.t.,"v_fldmon2") >endif >select v_fldmon1 >browse >*!* Remote view v_fldmon1 is empty (rolled back) >select v_fldmon2 >browse >*!* Remote view v_fldmon2 is empty (rolled back) >=requery("v_fldmon1") >*!* Remote view v_fldmon1 has 1 record that was updated to underlying table >=requery("v_fldmon2") >*!* Remote view v_fldmon2 is empty because tableupdate failed due to null primary key >>I thought that I could use a transaction, but the transaction only rolls back the data in the remote views and the first underlying table is still updated with the new record. I need for the record in the first remote view that succeeded on tableupdate() to be rolled back/removed when the second tableupdate fails.