Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get a record to lock?
Message
From
16/10/2000 22:45:40
 
 
To
16/10/2000 20:38:55
Raymond Humphrys
Michigan Department of Community Health
Bath, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00429650
Message ID:
00430133
Views:
14
As Larry suggested, it's time to see if your combination of server OS and network client are capable of supporting a record lock.

In the command window:
USE MyFile EXCLUSIVE
?RLOCK("MyFile")
If the 2nd line returns .T., you can get a lock, and there is a problem somewhere in your code. If not, you have a network-level issue that must be addressed.

>NT 4.0 sp4. This seems so simple, but it's driving me kind of nuts.
>
>ray
>
>>WAG time because it doesn't make sense!
>>
>>What operating system is being used by the "server" machine? Locks are held by the operating system where the files reside. If the OS is not robust enough to create a "lock" then you won't be able to get a lock on more than one record.
>>
>>>I have since slimmed this down to the following:
>>>LOCAL llLocked
>>>llLocked = .F.
>>>
>>>DO WHILE NOT llLocked
>>> IF RLOCK("MyFile")
>>> llLocked = .T.
>>>
>>> ELSE
>>> WAIT WINDOW "Couldn't Lock Record !"
>>>
>>> ENDIF
>>>
>>>ENDDO
>>>
>>>
>>>When I get to this code I am using alias "myfile". This more ligHtweight version still will not let me lock my record. Another I've noticed is that I can lock a record once, but when I come back and try to lock another record, a different one, I can't. Same result, can't lock.
>>>
>>>What can be holding the lock? Is it on the header, the file?
>>*snip*
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform