CHAPTER 10 Database Error Messages
847
Primary key for row in table ’%1’ is referenced in another table
Item Value
SQLCODE -198
Constant SQLE_PRIMARY_KEY_VALUE_REF
SQLSTATE 23W05
Sybase error code 547
ODBC 2 State 23000
ODBC 3 State 23000
Parameter 1 The name of the table containing the row being
modified.
You attempted to delete or modify a row whose primary key value is
referenced elsewhere in the database.
Primary key for table ’%1’ is not unique
Item Value
SQLCODE -193
Constant SQLE_PRIMARY_KEY_NOT_UNIQUE
SQLSTATE 23W01
Sybase error code 2601
ODBC 2 State 23000
ODBC 3 State 23000
Parameter 1 Name of the table where the problem was detected.
You attempted to add a new row to a table, but the new row has the same
primary key as an existing row. The database has not added the incorrect row
to the database. For example, you might have added a student with student
number 86004 and there is already a row for a student with that number.
Probable cause
Probable cause