Hetal,
The answer is simple, don't use primary keys for outside database use. There
are always two identifiers, one for the humans and one for the database. In
that case you cannot have any conflict. Identifiers types can be: automatic
idents which are integers or Guids, the later is prefered, because those you
can manage yourself.
If you want to use the identifier outside the database as well, then first
let the database create that one (not a Guid that is for humans unusable)
and show that to the user. I find that a very bad solution because you are
by instance dependend on what exist and what is deleted.
Cor
"Hetal" <he*************@gmail.comschreef in bericht
news:11**********************@57g2000hsv.googlegro ups.com...
>I searched online and went through the forums as well, but i could not
find a way to capture the database primary key violation exception.
Any help will be much appreciated.
Thanks,
Hetal