Subject | Problem with foreign keys |
---|---|
Author | Rodrigo Bravo |
Post date | 2004-05-06T23:35:20Z |
Hi,
I've a problem with Firebird 1.5 Final Release:
PREVIOUS STATUS:
TABLEA:
------------------------
ID | DESCRIPTION
------------------------
TABLEB:
----------------------------------
ID | ID_FK | DESCRIPTION
-----------------------------------
Important: On TABLEB exists a Foreign Key, between TABLEB.ID_FK and TABLEA.ID
STEP 1 on TransactionA:
Execute the sql: "SELECT * FROM TABLEA WHERE A_ID = 1"
STEP 2 on TransactionB:
Execute the sql: "INSERT INTO TABLEB (ID, ID_FK, DESCRIPTION) VALUES (1,
1, "Hello")"
And the last command returns this error:
Unsuccessful execution caused by system error that does not preclude successful
execution of subsequent statements lock conflict on no wait transaction.
violation of FOREIGN KEY constraint "FK_XXXX" on table "TABLEB"
Does anyone knows why I can't insert the last record? Thanks!
I've a problem with Firebird 1.5 Final Release:
PREVIOUS STATUS:
TABLEA:
------------------------
ID | DESCRIPTION
------------------------
TABLEB:
----------------------------------
ID | ID_FK | DESCRIPTION
-----------------------------------
Important: On TABLEB exists a Foreign Key, between TABLEB.ID_FK and TABLEA.ID
STEP 1 on TransactionA:
Execute the sql: "SELECT * FROM TABLEA WHERE A_ID = 1"
STEP 2 on TransactionB:
Execute the sql: "INSERT INTO TABLEB (ID, ID_FK, DESCRIPTION) VALUES (1,
1, "Hello")"
And the last command returns this error:
Unsuccessful execution caused by system error that does not preclude successful
execution of subsequent statements lock conflict on no wait transaction.
violation of FOREIGN KEY constraint "FK_XXXX" on table "TABLEB"
Does anyone knows why I can't insert the last record? Thanks!