Page 1 of 1

Disconnect in multithreading

Posted: 18.04.2016, 12:10
by Delian
Hi,

I'm using server MS SQL 2014. I have issue with disconnect in multithreading. Connect and disconnect is working with one thread. When disconnect in the second thread, i have exception. I have attached call stack.
MSSQL.png
Exception occurs with codetyphon 5.7 with ZeosLib 7.2.0.41 and Delphi XE7 with ZeosLib 7.1.4-stable.

Exception occurs also in designtime.

Code: Select all

- create empty project
- Add and configure first TZConnection in main form.
- add and configure second TZConnection in main form.
- connect first connection.
- connect second connection.
- disconnect first connection.
- try to disconnect second connection <- Got exception:(
MSSQL2.png

Re: Disconnect in multithreading

Posted: 22.04.2016, 20:33
by marsupilami
Hello Delian,

please don't use ntwdblib.dll and the mssql driver because the ntwdblib.dll is not supported by Microsoft anymore. Please use FreeTDS or OleDB from Zeos7.3.
With best regards,

Jan