Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record in use and File in use errors
Message
De
18/07/2006 05:43:53
 
 
À
17/07/2006 13:52:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01136694
Message ID:
01137172
Vues:
25
This message has been marked as the solution to the initial question of the thread.
John

I've replied to your request on the Foxpro Forum too :-)
...
>>
>>Aye but what BUFFERING do you have. If TABLE buffering then the fact that somneone has it open for browsing would preempt a delete attempt by another. wouldn't it?
>
>I had each form set up to use Pessimistic buffering, but have changed it to Optimistic buffering. I'm not sure if that's all I need to do, but things seem to be working now. Granted, they haven't done all that much testing on it since that change, but two batches of invoices posted error-free. Fingers crossed...

I was referring more to Table or Record buffering (both can be optimistic or pess.)

>
>>Also, your code has no provision for actually testing for another user having the record before attempting to delete it.
>
>True. What kind of code could I use to see if another user is using a table? Or to see if another user is using the current record? Again, sorry if these are basic questions, but I'm nowhere NEAR as experienced in VFP as 99% (or more) of the people here.
If RLOCK()    && locks the record if successful so no contention with another user
*   Do your updating
    UNLOCK
Endif
Similarly FLOCK() can lock the whole table but is less desirable as other users can't do updates at the same time till it's released.

You must see Record Locking in Help. This is fundamental when it comes to multi-user access where updating is involved.

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform