Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
So Confused about the USE statement
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00403974
Message ID:
00404074
Views:
15
Using a table SHARED will still give you an error if someone else already has it open EXCL. You would just use SHARED to override the SET EXCLUSIVE mode. This is the mode one would typically choose for a multiuser environment (of course, you also have to handle table updates then). In either case, you should get an error if you try to open a table shared that is already opened excl and you should also get an error if you try to open a table EXCL that is already open SHARED.

Are you sure that the table, at the same network location, was open EXCL by the other app when you opened it SHARED?

Bill
>I do not understand why you would use SHARED? If someone has EXCLUSIVE set, then they need the files EXCLUSIVE. What would be an example of needing the SHARED?
>
>Brenda
>
>
>>I always thought that EXCLUSIVE meant exclusive
>
>You are correct, exclusive is exclusive.
>
>>But then the SHARED says that it can also USE a table that was opened
>>EXCLUSIVE.
>>EXCLUSIVE
>>Opens a table for exclusive use on a network. For more information on the
>>exclusive use of tables, see SET EXCLUSIVE.
>
>>SHARED
>>Opens a table for shared use on a network. SHARED allows you to open a table
>>for shared use even when EXCLUSIVE is set ON.
>
>That means that the SHARED or EXCLUSIVE clause of the USE command overrides the current SET EXCLUSIVE ON|OFF setting.
>e.g.
>SET EXCLUSIVE OFF
>USE table EXCLUSIVE
>? ISEXCLUSIVE() && .T.
>USE
>SET EXCLUSIVE ON
>USE table SHARED
>? ISEXCLUSIVE() && .F.
Bill Mittenzwey
Previous
Reply
Map
View

Click here to load this message in the networking platform