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

Hi,

It's been a bit since looking into it, but I believe that if you use a SQL-SELECT statement to retrieve your data, that it will read from the disk. I'm not sure judging from the other responses and your code whether that will work for you.

Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform