Subject deadlock
Author Tiberiu Horvath
Hi all,

We use Delphi 6 and FB 1.5.2 on Linux servers. We use
D6 native TIB
components to access the data.

Our application works fine at almost all of our
clients. But we have 3
clients where the system sometimes reports "Deadlock
conflict on no wait

"table_document", with id_table_document as primary
"table_article" with id_table_article as PK and
id_table_document as FK.

Insert a new record in "table_document", commit,
trigger etc. Save

Insert localy (in a dbf local table) some articles
then, if the user
confirms that he want to save the data, we insert the
data in

Now , here is our problem:

Sometimes (randomly), the system doesn't seems to find
the saved
id_table_document record that we just inserted. It
generates a "Deadlock
conflict on no wait transaction" and of course a
"foreign key violation".

Our database object:

object dm: Tdm
OldCreateOrder = False
OnCreate = DataModuleCreate
Left = 408
Top = 119
Height = 739
Width = 863
object database: TIBDatabase
Params.Strings = (
LoginPrompt = False
DefaultTransaction = trans
IdleTimer = 0
SQLDialect = 3
TraceFlags = []
BeforeConnect = databaseBeforeConnect
Left = 32
Top = 8
object trans: TIBTransaction
Active = False
DefaultDatabase = database
Params.Strings = (
AutoStopAction = saNone
Left = 88
Top = 8

What can we do about this ?

Thank you in advance,

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around