Connecting Tech Pros Worldwide Help | Site Map

ODBC--call failed.

  #1  
Old July 24th, 2008, 06:01 PM
Newbie
 
Join Date: Jul 2008
Posts: 1
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)
  #2  
Old July 25th, 2008, 05:03 AM
Delerna's Avatar
Expert
 
Join Date: Jan 2008
Location: Sydney
Posts: 773
Provided Answers: 5

re: ODBC--call failed.


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
  #3  
Old July 25th, 2008, 01:43 PM
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,485
Provided Answers: 1

re: ODBC--call failed.


The error message is self explanatory.

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