Connecting Tech Pros Worldwide Help | Site Map

ODBC--call failed.

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 24th, 2008, 05:01 PM
Newbie
 
Join Date: Jul 2008
Posts: 1
Default ODBC--call failed.

Recently our database team member left and we have had this issue come up which I am trying to understand. The error is below, it comes up when we try to add a project entry under our Order Entry and ask for the Order Status.



ODBC--call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'blah'. Cannot insert duplicate key in object 'alsoblah'. (#2627) The statement has been terminated. [Microsoft][ODBC SQL Server Driver][SQL Server] (#3621)
Reply
  #2  
Old July 25th, 2008, 04:03 AM
Delerna's Avatar
Expert
 
Join Date: Jan 2008
Location: Sydney
Posts: 652
Default

That error means that you are trying to add a record to a table that is already there.
For example
Say you have a table that has one key field called OrderID
and in that table there is a record for OrderID 1001

If you now try to add an order to the table with orderID 1001
you will get the error you are getting.
Primary key constraints ensure that every record in your table is unique
Reply
  #3  
Old July 25th, 2008, 12:43 PM
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,310
Default

The error message is self explanatory.

you need to check if the data already exists before inserting that to database tables.
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.