Subject lock conflict on no wait transaction
Author Ryan Nilsson-Harding
Hi.

I'd like to understand the above error. (D6 & IBO4.2I)

My scenario:
I have a client table
CL_ID INTEGER PK,
NAME VARCHAR(64)

And I have a client CCEmail table
CL_ID INTEGER FK (CLIENT)
EMAIL VARCHAR(64)
NAME VARCHAR(64)
PRIMARY KEY (CL_ID, EMAIL)

I have separate transactions for the CCEmail & the Client tables'
access.
When a new record is inserted into CCEmail, I manually enter the
CL_ID (in OnNewRecord), and the user fills out EMAIL & NAME.

If the CLIENT transaction has a pending commit (I have edited some
detail in the client table), and I then try to enter a new record
into CCEmail, (for the same CL_ID) I get the above error.

If the CLIENT transaction has a pending commit, and I try to enter a
new record into CCEmail for a DIFFERENT CL_ID, there is no problem.

If the CLIENT transaction has NO pending commits, and I try to enter
a new record into CCEmail for the same CL_ID, there is no problem.

In other words, the error only occurs when I try to enter a new
record into CCEmail, for a certain CL_ID which has pending
commit/rollback.

I'm assuming this has something to do with the transaction
isolation, but I'm not really sure on why.
Both transactions have tiConcurrency.

Could someone please help me understand this, and also explain why
this occurs.
Thanks

Rgds,
-Ryan