stopping a long running query
Posted: Thu 28 Jul 2022 08:53
Hi,
We have search functionality in our app, customer use it usually very nicely but sometimes they enter searchterms which cause query to run very longtime and they wan't to cancel it.
Since queries are blocking, it can't be terminated.
This idea sounds ugly, but in separete test app it works:
Create a separete Uniconnection and Uniquery
Pass them to iTask, which runs actual query.
If users wan't to cancel task, call uniconnection.disconnect, catch exceptions. Free components.
I feel this sounds dangerous / can cause un expected behaviour, but is is dangerous?
I'm using Actian ZEN with ODBC.
We have search functionality in our app, customer use it usually very nicely but sometimes they enter searchterms which cause query to run very longtime and they wan't to cancel it.
Since queries are blocking, it can't be terminated.
This idea sounds ugly, but in separete test app it works:
Create a separete Uniconnection and Uniquery
Pass them to iTask, which runs actual query.
If users wan't to cancel task, call uniconnection.disconnect, catch exceptions. Free components.
I feel this sounds dangerous / can cause un expected behaviour, but is is dangerous?
I'm using Actian ZEN with ODBC.