
Table Buffering Problem (using level 5 buffering)
we are experiencing some of the same problems within our multi-user system
except with the locate command. I am currently writing a test program to
narrow down the taffic so our sniffer program can get a better trace. If I
had to take a guess at this point, it appears the "header" of the index file
does not get updated or at least VFP doesn't interpret it as changed. We
see a read of the Index header and if it hasn't changed, VFP doesn't request
the rest of the index and uses what's already in memory and searches for the
value. If found, it requests the record. If it calculates that somehow the
index has changed, it requests the entire index and then we see the request
for the record. In our case, we see as much as a 45 second delay before the
Locate command actually "sees" a new record. (I'm getting very good at
writing backout code and retry later!) Any command that forces the index to
be re-read fixes the problem. (GO TOP, GO BOTTOM, GO TOP, big SKIPS, etc)
Hoping to have a good trace in a few days with better info.
I have found that a parametized view with a Requery() appears to work where
the Locate won't but I'm not sure what the difference is nor what kind of
traffic is being generated by the view as compared to Locate(). Also plan
to get a trace on this too.
Don't know that this helps much . . .
Quote:
> I am using use CURSORSETPROP("BUFFERING",5) in VFP6.
> This method is ideal for my application which is a multiuser
> environment. I have found one problem with this buffering
> scheme: the data in records which have been changed by
> other users does not become updated in the buffered table
> which I am using unless I open a browse window and have
> refresh set to 1 second or greater. Editing of a record field is
> done through TEXT boxes on a form. In some fields it is
> necessary to validate the input to guarantee the value is unique
> (not used in any other record of the table for the specified
> field). This is accomplished by performing a SEEK().
> Unfortunately, the SEEK() is looking at stale data which is
> locked in as soon as buffering is set. I solved the problem
> by creating a tiny window and creating a browse using the
> NOWAIT option and then releasing the window before doing
> the SEEK(). This causes the data in the buffered table to
> become immediately updated. I don't like the solution
> because it is time consuming. Is there another way to get
> the table to automatically update without having to use a
> browse? (Setting REFRESH does not cause a buffered
> table to update on its own.)
> I would appreciate any ideas.
> --E. Myron