Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling errors inside a transaction
Message
From
26/06/2001 05:45:41
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00523402
Message ID:
00523445
Views:
10
Hi alonso

How about a ROLLBACK and handle the error ? thus:
IF lError
   ROLLBACK
ELSE
   END TRANSACTION
ENDIF
... 
...
IF lError
   .. handle the error
ENDIF
Walter,

>How can i "friendly" handle errors inside a transaction?
>
>I was thinking about something like this:
>
>
>
>xOldError = ON("ERROR")
>
>BEGIN TRANS
>
>ON ERROR xError = .T.
>
>&& inserts, updates and stuff go here
>
>if xError == .T.
>
>&& not sure about what to put in here!!!
>
>endif
>
>ENDTRANS
>
>ON ERROR &xOldError
>
>
>Any help is welcome.
>
>TIA,
>
>Alonso
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform