Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query doesn't return up to date data first time
Message
De
12/02/2008 08:05:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Query doesn't return up to date data first time
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01291747
Message ID:
01291747
Vues:
67
Hi,

I have a query that I use to build up the data for a report. The process is that user 1 creates a record (an invoice in this case), then user 2 creates a record in another table related to the record created by user 1 (a receipt against the invoice). When creating the receipts, the invoice is displayed on user 2's screen. A receipt can be made against an old invoice and the new one at the same time.

When the receipt is saved I run a query against the source tables to produce the receipt. The majority of times, the receipt only pulls the data from the old invoice. This made me think there is some kind of caching going on as the users are on different workstations. So I tried SET REFRESH TO 0, -1 before running the query, but that had no effect. I also ensured the hard disk cache was switched off, that also had no effect. However, grasping at straws, I ran the query twice and 29 times out of 30 this works.
FOR i = 1 to 2
   SELECT ....
ENDFOR
Can anyone think of anything else to try?

Thanks,
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform