Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table Buffer uncommited changes
Message
From
29/10/1998 10:51:41
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00152319
Message ID:
00152345
Views:
19
Richard ---

I think you have to put some code *before* requery that checks for changed/new records and asks the user if they want to discard or save the changes. You can do this by setting a From.Property (whatever you want to call it) True via the InterActive change event of the controls in the Grid. Before requery, ehck for that True and prompt the user (Save/Discard)....then reset the property to false....of course, this is generic advice.

Uncommitted changes cause all sorts of problems.....

>I have a form with a 6 page PageFrame. The 6th page has 2 option groups, a checkbox, 2 command buttons and a grid. One of the option groups has 3 buttons, the other has 2 buttons.
>
>Everything works fine except....when I am in the grid "updating things", if I click anywhere on the page, except for my allowable controls, I get the message that the Table Buffer has uncommited changes.....(the click event of the page fires a requery - by design...it may not be the best design but that's for another thread)
>
>The way I found that was by the 2 button option group which is a new addition and is disabled unless you have adequate rights (department manager, MIS manager, or developer level can access it but department member can not).
>
>I noticed that when I'm logged in with department member level access, and I'm on the grid updating stuff....If I click on the 2 button group I would get the message that the Table Buffer has uncommited changes. Because the button was visible I tried clicking on it even though it was disabled. This cause the click of the page to fire (I assume). So I made to button invisible and tried to click in its space to verify that the user could not accidently use the option group.
>
>That's when I realized that what was happening was the firing of the click event of the page...and it's requery.
>
>How can I better trap this, and eliminate the error message?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform