>do while !EOF() > begin tran > insert into ..... > end tran >enddo
Shawn,
The code above will never exit the loop, there is no skip in it. Also your use of a transaction is totally unhelpful to your objective. Wrapping a single operation in a transaction does not add anything to the operation. Try something like this;
LOCAL llFailed
BEGINTRANSACTIONSCANINSERTINTO ...
IF NOT TableUpdate(...)
* Operation failed
llFailed = .T.
EXITENDIFENDSCANIF llFailed
* Something went wrong so undo the whole thingROLLBACKELSE * All is ok, committ
ENDTRANSACTION
ENDIF