could you just make the candidate key a concatenation of the user and email address so the index sees
bobinfo@shoestore.com ? Still unique, no conflict.'
>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
Charles Hankey
Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy
Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.
-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin
Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.