BDE, Delphi, ODBC, SQL Native Client & Dead lock

Posted by EspenS on Stack Overflow See other posts from Stack Overflow or by EspenS
Published on 2010-03-24T09:02:28Z Indexed on 2010/03/24 10:43 UTC
Read the original article Hit count: 363

Filed under:
|
|
|
|

Hi.

We have some Delphi code that uses the BDE to Access SQL Server 2008 through the SQL Server Native Client ODBC driver (2005 version). Our issue is that we're experiencing some deadlock issues in a loop doing inserts to multiple tables.

The whole loop is done within a [TDatabase].StartTransaction. Looking at the SQL Server Profiler we clearly see that at one point during the loop the SPID (Session ID?) change, and then we naturally end up with a deadlock. (Both SPID doing inserts to the same table)

It seems like the BDE at some point does a second connection to the DB...

(Although I would love to skip the BDE, it's currently not possible. )

Anyone with experiences to share?

© Stack Overflow or respective owner

Related posts about bde

Related posts about delphi