This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > Insert Record - Preventing Primary Key duplication





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Insert Record - Preventing Primary Key duplication
Potttsy

2004-08-13, 12:15 pm

Hiya,

Recently I have managed to get a complete ASP website created with create /
edit / delete facilites for administering registered users, however it is still
possible to cause errors when attempting to create a user with an identical
username (which is used as a primary key in the attached database). Could
someone be kind enough to point me in the right direction as to how I may
prevent this happening - so the admin attempting to create the 'faulty' new
user is redirected to a 'you are attempting to create a user with an identical
username' page?
I don't use a auto increment primary key as the username is used elsewhere in
the site for pointing the user to a unique area - or should I perhaps consider
using an auto increment primary key?

Any assistance appreciated

Carl Potts

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews