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()
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.