Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom writebuffer
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00018427
Message ID:
00018432
Views:
34
>>Hi,
>>
>>I'm having trouble with my custom write buffer.When I am on a record and make changes then go to the next record using my toolbar the writebuffer traps for changes and allows me to commit or revert my changes. But if I were to make changes then select my listbox and go to another record, the changes are already committed. How do I check if data has changed in any of my text boxes and prompt the user to save, discard or cancel the last action?
>>
>>TIA
>>Jon
>
>Jon,
>
>This happens because you are still on the same record when you clicking your toolbar, and your WriteBuffer fires OK,
>But when you move record pointer through the listbox and use row buffering, the changes are written automatically, right, and you can do nothing about that.
>The solution may be to use table buffering, if it suits. When you move
>the record pointer through listbox you may trap this, for example,in Listbox InteractiveChange event, and use GETFIELDSTATE() to check, if particular field was updated then ask for confirmation, and then force TABLEUPDATE() to update current record. It may be complicated, if you have many fields to update.
>In case of row buffering, may be you can put the trap to Listbox GotFocus(), that just off the top of my head, I didn't try it :)
>Well, just some thoughts.

Hi Nick,

I am using row buffering, and I attempted to put my trap in both the gotfocus() and when() events, with no success. As an experiment I tried table buffering, after the first attempt, it worked fine. It seems the first time I make changes and go to another record it don't work until I go to that same record. But after that it works fine. Table buffering is not practical as I wish to eventually store my data on our LAN. I think creating views is the way to go but haven't received enough information on the best way to handle my particular environment. I 'd like to store my DBC and tables on our LAN because there will be about 20 computers that will need access to this data, but don't know how to go about implementing it.

Thanks for the assistance
Jon Paskett

Microsoft Certified Systems Engineer
We all have to start somewhere...
Sometimes over again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform