Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
COM/DCOM et OLE Automation
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement