Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to see if file can be used exclusive w/o causing err
Message
From
15/08/2000 13:06:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00405024
Message ID:
00405070
Views:
16
Delete ?
handle=fcreate(lcFile)
Cetin


>Thanks Dorris,
>
>I tried flock() and it returns .t. even though I have the file open in another session. Then my attempts to delete the file generate an 'access denied' error...
>
>
>
>>Use FLOCK(). If it returns .f., then the file cannot be locked.
>>
>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform