>Use FLOCK(). If it returns .f., then the file cannot be locked.
>
An FLOCK() does not guarentee that you can use the file EXCLUSIE:
SET EXCLUSIVE OFF
USE
MyTable SHARED
USE
MyTable SHARED AGAIN IN 0 ALIAS AnotherAlias
? FLOCK()
USE
MyTable EXCLUSIVE
>use myfile
>if flock()
> use myfile excl
>else
> && whatever error coding you want
>endif
>
>
>>Hi,
>>
>>I need to test a file to see if it can be opened exclusively but, if not, I don't want the error handler to kick in. I'll test to see if the file is opened after the attempt.
>>
>>Any ideas?
>>
>>TIA