Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Help With Table Buffering/TABLEUPDATE()
Message
 
 
To
05/05/1998 11:09:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00096788
Message ID:
00097228
Views:
22
>Thank You for replying Jess,
>
>Jess, I put this code in the click event of a command button. after I mark my records for deletion in the grid, I click on the Delete button which refreshes the grid and gets rid of the unwanted records. I am not sure of how to do this a better way, although I know there must be one.
>
>Thanks in advance for your help and any more suggestions you could offer would be greatly appreciated.

Sorry for replying late on UTF regarding this topic. Our Internet Server was down almost the whole day for upgrade purposes.

To simplify everything, I must advise you to take advantage on the VFP's Data Environment Feature, where table setup (opening, buffering, relationship bet. tables) can be done instead of hard coded option. It is much easier to maintain and one way of maximizing the power of VFP.

If you prefer to hard code everything:

1. put the code in opening tables at Load Event of the form
2. set table buffering on at init or activate events of the form
3. set table buffering off at destroy event of the form

In deleting record:

We don't utilize delete column of the grid, but rather we have a command button to do the task because it's safer and not vulnerable to user error, and so, we set deletemark property of the grid to .F.
At click event of the delete command button, we put:

SELECT mytable
DELETE
=TABLEUPDATE(1,.T.,'mytable')
Thisform.Refresh()

It is awkward to use PACK command when in a module being used by multiple users because it will require to open tables exclusively. Just create a module for packing purposes.

I hope this will help you.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform