LOCAL aTables(1,2), intTables, intLoop, bolSuccess, strPath intTables = AUSED(aTables) && count tables open in this datasession IF intTables < 1 THEN RETURN .f. && no tables open to update ENDIF ************************************************************************************* * used this code for debugging purposes ************************************************************************************* *!* SET MULTILOCKS ON *!* CURSORSETPROP("Buffering", 5, "sysoptions") && set optimistic row buffering on *!* LIST STATUS TO D:\vfp8projects\datahub\errors\comstatus.txt *!* intNo = CURSORGETPROP("Buffering", "sysoptions") *!* strPath = SYS(5) + SYS(2003) *!* * STRTOFILE(STR(intNo), "c:\com1.txt") *!* SET DEFAULT TO D:\vfp8projects\datahub\errors\ *!* IF FILE('com.txt') && Does file exist? *!* gnTextFile = FOPEN('com.txt', 12) && If so, open read/write *!* ELSE *!* gnTextFile = FCREATE('com.txt', 0) && If not create it *!* ENDIF *!* IF gnTextFile < 0 && Check for error opening file *!* *!* ELSE && If no error, write to file *!* =FWRITE(gnTextFile , 'Table buffering = ' + STR(intNo)) *!* ENDIF *!* =FCLOSE(gnTextFile ) && Close file *!* SET DEFAULT TO (strPath) ************************************************************************************* BEGIN TRANSACTION && start transaction process FOR intLoop = 1 TO intTables bolSuccess = TABLEUPDATE(1, .f., aTables(intLoop, 1)) && update tables IF NOT bolSuccess THEN && if not successful update rollback and revert ROLLBACK thisform.mrevert() && revert all updates EXIT && failed on an update so don't bother with the rest ENDIF ENDFOR IF bolSuccess THEN END TRANSACTION && if all tables successfully updated end the transaction ENDIF RETURN bolSuccess && return success or failureSorry about that!