SQLConnection in another thread
Posted: Wed 24 Dec 2014 09:03
Hello,
I have so slow query and I tried to execute it in additional thread. The main reason of it - have a possibility to terminate new thread and interrupt query execuion. I created additional TSQLConnection and additional SQLDataSet into the thread. It works fine when query executes successfully, but if i try to close connection (or delete connection, or delete query) while executing query I got an error:
Project raised exception class EAssertionFailed with message 'TOLEDBCommand.Destroy - interfaces not released (2)
The questions are: Is it possible to cancel query execution? How can I do it? Is there another way to execute slow queries and cancel it?
I use RadStudio XE3 (C++ builder) and Devart DBExpress driver for SQL Server 6.3.5
I have so slow query and I tried to execute it in additional thread. The main reason of it - have a possibility to terminate new thread and interrupt query execuion. I created additional TSQLConnection and additional SQLDataSet into the thread. It works fine when query executes successfully, but if i try to close connection (or delete connection, or delete query) while executing query I got an error:
Project raised exception class EAssertionFailed with message 'TOLEDBCommand.Destroy - interfaces not released (2)
The questions are: Is it possible to cancel query execution? How can I do it? Is there another way to execute slow queries and cancel it?
I use RadStudio XE3 (C++ builder) and Devart DBExpress driver for SQL Server 6.3.5