Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed tip needed
Message
De
08/06/2001 15:25:40
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00514404
Message ID:
00517149
Vues:
18
Hoi peter,

Fijn om meer nederlanders te zien op de UT.


>Whether the the DO WHILE RECCOUNT() works I'm not sure, but just an =RECCOUNT() is sufficient to work. Why ? simple (or logic) too :
>
>Whenever an Append is performed, your PC must know about the last record which is contained in the header. So underwater the reccount() is performed. If it didn't, recno()'s would get confused. So, this one is waterproof. Now since you always get the actual reccount(), you *must* get the data too, otherwise things would get inconsistent.

It's not that simple unfortunately. Just try the following:
1. open one instance of VFP use any table and SET REFRESH TO 0,0
2. open another instance of VFP, open the same table and SET REFRESH TO 0,0
3. In instance1 append one record, and ? RECCOUNT()
4. Go to instance2 and ? RECOUNT() again.

You'll see that instance2 did not catch the appended record.

The problem is that the tableheader is chached in memory and only refreshes with a refresh (set by SET REFRESH) or a table or record lock.

This is the reason why VFP locks the tableheader when appending records.
In either way, one should wait until the global refresh occurs or lock (and unlock) a table, record or tableheader.

Regards,

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform