Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Force read from disk
Message
De
24/07/2000 16:33:27
Daniel Christensen
University of Wisconsin River Falls
River Falls, Wisconsin, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Force read from disk
Divers
Thread ID:
00396319
Message ID:
00396319
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform