Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd Database share/exclusive behavior
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00208957
Message ID:
00208976
Views:
27
>Hi All,
>
>I'm writing a utility that packs all the tables in a
>DBC. Part of the code involves checking if I'm able
>to have 'exclusive' use of the DBC by traping the
>error code and checking for error #1705 - File access
>denied.
>
>The problem is that when I was testing it using two
>PCs on a network, it worked fine. But when I tested
>it from the application (.exe) it was not even getting
>the error I was expecting.
>
>Part of the code I'm using is:
>
>on error aerror(laError)
>
>open database TESTDATA.DBC exclusive
>if laError[1] = 1705
> wait window "Exclusive use of Database is required!"
> return
>endof

You have to make sure the dbc is closed first. If you issue

open database TESTDATA.DBC exclusive

on an already open SHARED dbc, the command is simply ignored.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform