Error while inserting data.

H

Harsha

Hello all,

I am trying to insert data into a table.. and it is giving the following
error.
"ExecuteNonQuery -- Error Code: 80040E2F Message : A duplicate value
cannot be inserted into a unique index. [ Table name =
CUSTOMIZATION,Constraint name = IN_CUSTOMIZATION ] Minor Err.: 25016 Source
: SQL Server 2005 Mobile Edition ADO.NET".
Please help me how to resolve this. Thnaks in advance.

Harsha.
 
C

Chris Anderson [MVP-VB]

Harsha said:
Hello all,

I am trying to insert data into a table.. and it is giving the following
error.
"ExecuteNonQuery -- Error Code: 80040E2F Message : A duplicate value
cannot be inserted into a unique index. [ Table name =
CUSTOMIZATION,Constraint name = IN_CUSTOMIZATION ] Minor Err.: 25016 Source
: SQL Server 2005 Mobile Edition ADO.NET".
Please help me how to resolve this. Thnaks in advance.

Harsha.
Well, exactly as it says.... there's a unique constraint on the data....
and the data you are inserting, based on that constraint, already exists
in the table.... so it cannot insert it...

-ca
 
H

Harsha

Thank you very much Chris..

Chris Anderson said:
Harsha said:
Hello all,

I am trying to insert data into a table.. and it is giving the following
error.
"ExecuteNonQuery -- Error Code: 80040E2F Message : A duplicate value
cannot be inserted into a unique index. [ Table name =
CUSTOMIZATION,Constraint name = IN_CUSTOMIZATION ] Minor Err.: 25016 Source
: SQL Server 2005 Mobile Edition ADO.NET".
Please help me how to resolve this. Thnaks in advance.

Harsha.
Well, exactly as it says.... there's a unique constraint on the data....
and the data you are inserting, based on that constraint, already exists
in the table.... so it cannot insert it...

-ca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top