>My app has two forms open at the same time, each with a private data session. All data is being obtained from a VFP table in the database which resides on another computer across the network. Form "A" references a local view based on table "MYTABLE" with 10 records (VFP has MYTABLE open in that datasession even though I did not explicetly open it). If, after form "A" is open, another computer on the network adds an additional record to MYTABLE, the actual database table will have 11 records (confirmed). When form "B" executes an SQL-Select (select * from MYTABLE) the result set of the select will contain only 10 records. If I close form "A" and redo the SQL Select the result is now 11 records as it should be.
>
>So the SQL-Select in the private datasession of form "B" seems to be limited or influenced by the base table open in the private datasession of form "A". The buffer mode for both forms A & B = 0 (none) however the buffering for the local view in Form A is optamistic-table.
>
>I have tried altering SET REFERSH TO but can't seem to get that SQL Select to return the proper number of records as long as form "A" has that table open in its private datasession. Is SET REFRESH scoped to a data session or is it global?
>
>Does anyone have any suggestions on how to resolve this issue? I should be able to do a SQL Select from a form's with a private datasession and get the results from the DBF regardless of what is going on in another private datasession.
>I must be missing something here....
>
>Thanks
Hi Alec,
yes, VFP open 1 and only 1 file handle for every table opened on the application;
when you do the second SQL select, VFP read buffered data without check file system status.
On VFP9 you can disable it ( i don't test as work ) with:
SET REFRESH TO 0,-1
USE MYTABLE ...ALIAS MYTABLE
SYS(1104,"MYTABLE")
SELECT * FROM MYTABLE ...
On VFP8, try:
SYS(1104)
SELECT ... FROM MYTABLE