G
greatmacoy
IS THIS A CORRECT WAY OF USING WORKSPACES TO ENSURE DATA INTEGRITY:
DIM WSP AS WORKSPACES
DIM DBS AS DATABASE
SET WSP=DBENGINE.WORKSPACES(0)
SET DBS=CURRENTDB
ON ERROR GOTO HANDLER
WSP.BEGINTRANS
DBS.EXECUTE "UPDATE .... "
DBS.EXECUTE "INSERT .... "
WSP.COMMITTRANS
DBS.CLOSE
WSP.CLOSE
EXIT SUB
HANDLER:
WSP.ROLLBACK
DBS.CLOSE
WSP.CLOS
DIM WSP AS WORKSPACES
DIM DBS AS DATABASE
SET WSP=DBENGINE.WORKSPACES(0)
SET DBS=CURRENTDB
ON ERROR GOTO HANDLER
WSP.BEGINTRANS
DBS.EXECUTE "UPDATE .... "
DBS.EXECUTE "INSERT .... "
WSP.COMMITTRANS
DBS.CLOSE
WSP.CLOSE
EXIT SUB
HANDLER:
WSP.ROLLBACK
DBS.CLOSE
WSP.CLOS