Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using tables over network
Message
De
26/11/1999 11:01:19
 
 
À
26/11/1999 10:27:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00295714
Message ID:
00295735
Vues:
18
>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.
>

If you are using private Datasessions, you have to remember that there are a bunch of settings whose values are scoped to a datasession. OYu can ge ta list of these commands in the help file under "commands that scope to a datasession".

The default value for SET EXCLUSIVE is ON for the default datasession, but OFF for private datasessions, so I'm not sure if this is your problem or not.

How are you trying to open the tables? What error are you getting?

>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.

In general, you should not have a primary key on a field with a real world value, (each of your tables should have a surrogate PK, one whose value is absolutely meaningless except as a key for that table). After you implement this, you should never have the need to add a record with the same PK value as a previously added and deleted record.


>What am I doing wrong with these two areas? Thanks in advance,

IN the future, it's a good idea to create two separate messages if you have to unrelated questions. This gives the reader a chance to know by looking at the thread to tell if your question has been addressed or not. Helps you and everyone else reading the thread.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform