help needed in new user registration page

indianswz

Newcomer
Joined
Mar 27, 2004
Messages
14
hi....friends,

i am building user registration page in asp.net where i want to register and i want the username to be unique. i am using access 2000 as the database with oledb and language as vb. i want to check that the username entered for registration is unique....and if it's present in the database it should give error........."USERNAME ALREADY TAKEN" so i wanted to know how can i do this........i know how to do it in the adodb way......but don't know how to using oledb.......

if u guys can help me with some samples........as i a newbie to this kind.

bye
 
indianswz said:
hi....friends,

i am building user registration page in asp.net where i want to register and i want the username to be unique. i am using access 2000 as the database with oledb and language as vb. i want to check that the username entered for registration is unique....and if it's present in the database it should give error........."USERNAME ALREADY TAKEN" so i wanted to know how can i do this........i know how to do it in the adodb way......but don't know how to using oledb.......

if u guys can help me with some samples........as i a newbie to this kind.

bye
make Login a unique field in your data table. . .

psuedocode
PHP:
try 
   insert into table (login) 
catch 
   UniqueConstraintViolation
	 display "USERNAME ALREADY TAKEN"
   else
	 rethrow
 
Back
Top