John,
I've personally stayed away from TRANSACTIONs because of worries about missing data. So this is theory...
You have 3 BEGIN TRANSACTION 'commands' and I read this a they being NESTED to a depth of 3.
Do you have 3 subsequent END TRANSACTION and ROLLBACKs? Seems to me you would need to have them.
>Hi,
>Yes, I used to read your and wiki corruption that prevent corruption. I have do the "most" thing to prevent it.
>Any way, it could be poow design as you mention, but.. how to consider as good and poor design?
>I always use
>
>
>*---Update/Insert
>BEGIN TRANSACTION
>IF llRollBack AND NOT TABLEUPDATE(.T., .F., "Sales")
> llRollBack = .T.
>ENDIF
>
>BEGIN TRANSACTION
>IF llRollBack AND NOT TABLEUPDATE(.T., .F., "SalesDetails")
> llRollBack = .T.
>ENDIF
>
>BEGIN TRANSACTION
>IF llRollBack AND NOT TABLEUPDATE(.T., .F., "Stock")
> llRollBack = .T.
>ENDIF
>
>....
>IF llRollBack
> AERROR(laError)
> ROLLBACK
> TABLEREVERT(.T., "Sales")
> ....
>ELSE
> END TRANSACTION
> FLUSH
>ENDIF
>
>
>
>You could refer to thread #
748117.
>
>Thank you