Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rolling back input done via insert into and replace cmds
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00777224
Message ID:
00777348
Views:
12
>You need to enclose all of the transactions between a begin and end transaction structure. If
>no errors occur, you'll issue the END TRANSACTION, otherwise, you'll issue the ROLLBACK.
>
>However, your tables MUST be included in a DBC, and I imagine they'll need to be buffered. The
>reason I sound a little vague on the buffering is that I only use buffered sql views myself. I
>don't do any direct writing to tables.

Yes, you must use buffered tables for this. However, the data changes don't need to be wrapped in the BEGIN/END TRANSACTION: only the actual TableUpdate() calls. Here's some pseudocode:
USE myTable
CURSORSETPROP("Buffering", 5)
REPLACE myField WITH myValue
BEGIN TRANSACTION
IF TABLEUPDATE()
   END TRANSACTION
ELSE
   ROLLBACK
   TABLEREVERT()
ENDIF
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform