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
transaction".

"table_document", with id_table_document as primary
key
"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
id_table_document.

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
"table_article"

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
DatabaseName = 'C:\DEVELOP\GESTOCW\GESTOC.GDB'
Params.Strings = (
'user_name=SYSDBA'
'password=xxxx')
LoginPrompt = False
DefaultTransaction = trans
IdleTimer = 0
SQLDialect = 3
TraceFlags = []
BeforeConnect = databaseBeforeConnect
Left = 32
Top = 8
end
object trans: TIBTransaction
Active = False
DefaultDatabase = database
Params.Strings = (
'read_committed'
'rec_version'
'nowait')
AutoStopAction = saNone
Left = 88
Top = 8
end


What can we do about this ?


Thank you in advance,
Tiberiu




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com