Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffer management improvement in VFP 6 SP3?
Message
From
18/11/1999 13:35:04
 
 
To
04/11/1999 00:23:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00286696
Message ID:
00292583
Views:
21
Didn't know I would be missed -- had to visit two of my adult daughters on the east coast ( I live in California ), attended some meetings, and got "Product out the door".

Problem I am observing is where two ( or more, but we can stick with two ) users display a cursor file in a grid showing documents to be processed. We only permit one user at a time to Edit documents, so we store the user's ID in the 'Header' record for the document ( field name: IN_USE_BY ). Rows where .not. Empty( IN_USE_BY ) are displayed in light grey ( gray ? ) forecolor. Whenever a user double clicks on any cell in a row, or single clicks on any cell to "select" the row ( and display the row as highlighted ) and then clicks on [Open] button on the form, we check the original table with a SEEK() and test for .not. empty( IN_USE_BY ).

What I have been seeing in the past couple of months since SP3 for VFP6 is that I need to refresh the buffers for the original "Header" table. I have found FLUSH to be incomplete in its efficacy, so have resorted to a UDF: RE_USE(), which I wrote a couple years ago to solve a similar problem.

RE_USE() accepts an alias as a parameter, saves the current work area, switches to the alias's work area ( if necessary ), saves the Recno(), Tag(), Filter, closes the table, re-uses the table and resets the Recno(), Tag() and Filter, and finally restores the originally selected workarea ( if necessary ). NOTE: since we pass an alias, it may / may not be the currently selected work area, so we keep everyone happy by remembering the status of the work areas when we enter and put everything back when we leave.

I know this is not a sexy problem, does not involve a DCOM server referencing SQL 7.x tables in an n-level distributed process, on the Internet, but it is the problem that I have observed. I have a work-around ( RE_USE() UDF ) but was fishing for what changed inside VFP. We have been running this product since 1993 ( Foxpro for Windows back then, VFP6 SP 3 now ).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform