Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open table excl
Message
From
18/09/2003 10:32:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/09/2003 10:07:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00830273
Message ID:
00830294
Views:
19
>Is there a really good way to check if it's possible to open a table exclusively?
>
>Thanks, Mark
tcTable = 'myTable.dbf'
local llExclusive, lnHandle
lnHandle = fopen(tcTable,2) && Try to open RW
llExclusive = (lnHandle > 0)  && Not in use
if llExclusive
   fclose(lnHandle)
   on error llExclUse = .F. && In nano/milliseconds might someone else open
   use (tcTable) exclusive
   on error
else
   if ferror() # 5 && Access denied
*...
   endif
endif
return llExclusive 
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
Reply
Map
View

Click here to load this message in the networking platform