Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record in use and File in use errors
Message
From
18/07/2006 11:29:04
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01136694
Message ID:
01137265
Views:
16
Thanks very much, Terry, and everyone else for your help. I appreciate everything I get from everyone here as I work my way towards becoming a VFP Genius. ;)

I put this into my system as a check, but it seemed that changing my buffering from Pessimistic to Optimistic did the trick. I'm not sure why I chose Pessimistic in the first place, but if Optimistic fixes my problem, I'm a happy guy.

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform