Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using tables over network
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00295714
Message ID:
00295728
Vues:
19
>>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().
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform