Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursorsetprop() +tablerevert()
Message
From
19/12/1997 15:35:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00067244
Message ID:
00067281
Views:
30
>>>I've got the tablerevert working ok on a form whereas all changes to a record are undone upon 'Abort' but how do I undo an 'Append blank' if the user chooses to 'Abort' halfway thru?
>>You can use record valid and if on a grid you can control it before trigger in beforerowcolchange.
>
>Cetin, could you be more specific?
I had already answered about an hour ago but I couldn't see it. Sorry if a duplication.
Without transaction (begin transaction...rollback...commit...end transaction) :
- Buffering set to row ;
append blank
... && Edits to appended record without rec pointer moving
tablerevert() && Reverts appending
- Buffering set to table ;
append blank
... && Edits to appended record
.... && Rec pointer moves (also might be another append, insert into etc)
*tablerevert() && Reverts current rec
tablerevert(.t.) && Reverts all up to last update

-If you use form wizard navigation buttons a user has opportunity to append a blank rec with only Add button and then s/he either has the chance to Save or Revert (reverts append blank).
-If you use a grid than you can control a record before table's record valid fires via BeforeRowColChange.
-Getfldstate(-1) gives info about record edition-deletion status.
-Using transaction you can control all better.
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
Reply
Map
View

Click here to load this message in the networking platform