Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Blank Forms & Data Entry
Message
 
To
08/06/1998 19:12:57
David Turnedge
Turnedge Associates
Sydney, Australia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00106111
Message ID:
00106115
Views:
30
David,

This one got me, too, when I first started using VFP's buffering. When you add a new record to the cursor the record pointer moves and VFP automatically commits your changes, even in the new record. So if you want to be able to revert an APPEND BLANK, you'll need table buffering. It shouldn't cause you a problem as long as you never assume that moving the record pointer will force an implicit TABLEUPDATE(). You need to make sure that you explicitly update the table whenever you need updates to occur.

Now that I've helped you out a bit, wouldn't you like to welcome my wife and me into your home during the 2000 games? :)

>I have a client that wants to mimic the way many accounting systems seem to use forms during master file maintenance (ACCPAC, Dynamics, etc.)
>
>When a user calls up, say, the Category maintenance form, she should get a blank form.
>
>If she enters an ID in the index field and that ID already exists, that record should fill the form. If the ID does not exist, the form should go into 'add' mode.
>
>I've been trying to implement this without reverting back to the GATHER and SCATTER commands.
>
>My form automatically does an APPEND BLANK on opening and, if the user calls up an existing record, I TABLEREVERT() to get rid of the blank record.
>
>MULTILOCKS is ON and CURSORSETPROP("Buffering", 3).
>
>It seems that TABLEREVERT() does not kill the blank record if not required - I assumed that APPEND BLANK would only write a new blank record to disk when I issue TABLEUPDATE().
>
>Can anyone help me here? I'd rather not have to write extra code to handle GATHER and SCATTER commands.
>
>David Turnedge
>Sydney, Australia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform