displaying error in vb.net ( when entering duplicate values in sqlserver)

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
HII
i have one table in vb.net form.
in that,i placed 3 columns and i made them unique constraints by writing the code in sql server as

CREATE TABLE AA
(
NAME VARCHAR(50 ) UNIQUE NOT NULL,
ID NUMERIC(9) UNIQUE NOT NULL,
ACCNO NUMERIC(9) UNIQUE NOT NULL
)

SO, a table is created in the back end

now from vb.net if i try to enter any duplicate values in vb.net , then an error is generated automatically, which i dont want.

i want to display an error using MESSAGEBOX FROM VB.NET.

THANK U
 
Back
Top