Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why no Directory() like File()?
Message
From
10/12/1999 11:30:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00301679
Message ID:
00301759
Views:
29
>
>>handle = fopen("mydbf.dbf",12) && Try a RW open
>>if handle > 0 && Not in use elsewhere
>>   =fclose(handle)
>>   use mydbf exclusive
>>endif
>
>Much more elegant than what I did, which <b>was</b>:
>
>local lcOldError, llFailed
>lcOldError = on('error')
>on error llFailed = .t.
>use mytable excl
>if !empty(lcOldError)
>   on errer &lcOldError
>else
>   on error
>endif

Better yet VFP could have a function like UseExclusive(Params) returning logical :)
Cetin
Ç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