Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using tables over network
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00295714
Message ID:
00295739
Views:
22
>>>I was wondering how to share tables over a network. How do you allow two users to open the same table at the same time? I used SET EXCLUSIVE OFF in my main.prg for my project, but that doesn't work.
>>>
>>>I also thought that SET DELETED ON ignores the deleted records in a table. But if I delete a record and try to add another record with the same ID or on a table that has an autoincrement field it gives me a unique index violation error.I get rid of it by packing the table but I thought thats why I use the SET DELETED command.
>>>
>>>What am I doing wrong with these two areas? Thanks in advance,
>>>
>>>Tyler
>>
>>Hi Tyler,
>>
>>In first case SET EXCLUSIVE is scoped to the current data session, so setting it only in MAIN.PRG is not enough. You have to set it again in form.Load() or Dataenvironment.BeforeOpenTables() event.
>>
>>In second case SET DELETED ( aso sscoped to the current datasession, BTW) does not affect handling the unique indexes. The record still stays in the table (until you PACK it) and violates uniqueness. Yo better use the generated and truly unique surrogate key for your Primary index.
>>
>>Nick
>
>I also generate a unique key for the primary index...but with "candidate" indexs I use a filter of .not.deleted().

Thart's fine as long as you realize that filtered indexes are not usable in Rushmore-optimized queries.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform