unique key constraint

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
hello,
i developed a form with 3 columns.
say name,id,and accnu.
now i want to make these fields as unique.
so in the backend that is in sql server 2000 ,i created one table with unique key constraints.
if i run this application in vb.net ,
and if i enter any repeated values,then an error is generated automatically.
but i want to display an error if i enter the repeated values.

suppose assume that i entered repeated name then an error must display saying that, "Already existing name" ,pls enter a new one.

similarly for the same with "id" and "accnu"

thank u
 
Last edited by a moderator:
Try using a Try...Catch...Finaly to trap for the error, and display a "nicer" error to the user.

Tg
 
Back
Top