Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using tables over network
Message
 
To
26/11/1999 10:27:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00295714
Message ID:
00295722
Views:
24
>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
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform