Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Temporarily Disable Candidate Key?
Message
De
20/10/2004 16:08:41
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Temporarily Disable Candidate Key?
Divers
Thread ID:
00953124
Message ID:
00953124
Vues:
56
Hi,

We have a desktop app with some web add ons. So our clients have their data on their network and on our web server. We have a program that syncs both data sets. One of the tables has a field called "InetID" and its a candidate key. Basically, its someone's user name to log into the web portion. The best way to explain the problem is by example:

Let's say there is one organization in our desktop app called "ABC Shoe Store". There is one contact for ABC shoe store named "Bob" His email address is "info@abcshoestore.com" His internet user name defaults to his email address so its "info@abcshoestore.com" Business is going good so he hires a new assistant "Mary" and he wants her to have internet access. His username is changed to "bob@abcshoestore.com". Then they add Mary with a username "info@abcshoestore.com"

They run the syncing program to export the data to the web. On the website Bob's username is "info@abcshoestore.com" The online data is buffered and it updates one record at a time. So, Mary's new username is added and it causes an error because two usernames with "info@abcshoestore.com" exist - even though if the whole table was allowed to be processed they would be unique.

I was wondering if anyone knows of a way to easily the disable candidate key and then enable it again after the whole table was processed? I thought about removing the index and adding it again but that seems rather kludgy to me.

Thanks and sorry about the long message,
Chris
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform