General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Results of SQL Select effected by another DataSession
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only