Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Revert a insert in a many side table.
Message
From
18/04/2002 05:06:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/04/2002 04:12:58
Dino Liberale
Ministero Lavori Pubblici
Trieste, Italy
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00646212
Message ID:
00646217
Views:
19
>Hi all,
>In a form I have 2 tables in data env. (cursors optimistic buffered at table level (5)) cursors are in relation as one to many (table "workers" and table "workdays" as 5 recs with fields day and hour they start and end to work.
>When insert work is request I append blank record in table "workers", replace the primay key with appropriate value and insert 5 records in table "workdays" with default values (INSERT INTO Workers ...). If user want to leave without save data click undo cmd that contain a TABLEREVERT(.T.). This revert only data in the main table "workers" leaving the 5 inserted records in table "workdays". Why tablerevert doesn't revert all tables ?
>T.I.A.
>
>Dino.

Dino,
Use tablerevert() with alias. Otherwise it would only revert current alias.
tablerevert(.t.,'Child')
tablerevert(.t.,'Parent')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform