Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLSTATE=23000 (No primary value......)

Status
Not open for further replies.

bostjan

IS-IT--Management
Apr 23, 2001
7
SI
When I try to update new value to database table I recieve the next SQLSTATEMENT error:

SQLSTATE = 23000
[Sybase][ODBC Driver]Integrity constraint violation: no primary key value for foreign key 'f_sifra_kupca_popa' in table 'sif_stopnje_ddv'

No changes made to database.

INSERT INTO "sif_stopnje_ddv" ( "tarifa", "stopnja", "opis", "standardna", "sifra_kupca", "sifra_dobavitelja", "konto_kupci", "konto_dobav" ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )

 
What is the name of the foreign key column? My guess it is named "sifra_kupca_popa". If so you must include it in the list of columns receiving data and give it a value that matches one of the values in the primary key column.

Code:
INSERT INTO "sif_stopnje_ddv" ( "tarifa", "stopnja", "opis", "standardna", "sifra_kupca"
, "sifra_kupca_popa"
Code:
, "sifra_dobavitelja", "konto_kupci", "konto_dobav" ) VALUES ( ?, ?, ?, ?, ?
, ?
Code:
, ?, ?, ? )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top