BDE and SQL server
Posted on 2003-11-17
I have application written in Delphi and connects to SQL server (2000), via BDE and ODBC.
When using TQuery or TStoredProcedure, prepare method, I think a new session to DB is opened cause I get exception about not being in transaction or deadlock because of the transaction.
the scenario as following:
qry <- create TQuery with session 1 (s1) and DB 1 (d1)
sql, change SQL, and call prepare
(*) SELECT that table => dead lock
* in debug I found that in this stage if I check db.InTransaction I will get false.
The workaround was not to use prepare and create the params manually, but that is annoying and much code
Please advise, any ideas?