Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Force read from disk
Message
From
24/07/2000 16:33:27
Daniel Christensen
University of Wisconsin River Falls
River Falls, Wisconsin, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Force read from disk
Miscellaneous
Thread ID:
00396319
Message ID:
00396319
Views:
45
I am working on an application which submits data to a table for processing by another application. The second application polls that table for new entries, takes whatever action is requested and then updates the record in the table, marking it as processed. The problem is that my first application does not see the changes made to the record by the second application. Is there a way to force foxpro to re-read the values directly from disk without closing and reopening the table?

The following closely resembles the code that I am using:

use transactions shared in 0
select transactions
append blank
replace transactions.sequence with GetSequence()
replace transactions.function with 32
replace transactions.status with 'A'
unlock

counter=0
* transaction processor should change status flag to 'S' or 'X'
* when it is done with the record.
do while transactions.status = 'A' and counter<10
wait window "Waiting for transaction processor" timeout 3
counter = counter + 1
enddo

do case
case transactions.status = 'A'
** transaction processor not responding
** this is what I always get, because the value is not
** refreshed from disk
case transactions.status = 'X'
** error
case transactions.status = 'S'
** success
otherwise
** shouldn't happen
endcase
Next
Reply
Map
View

Click here to load this message in the networking platform