TMSQuery hang on when you call close method

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
matriks
Posts: 1
Joined: Wed 23 Apr 2014 22:05

TMSQuery hang on when you call close method

Post by matriks » Wed 23 Apr 2014 22:30

Hello,

I want to make a very simple data viewer to execute sql statements like MS SQL Managment Studio Query Window.
To do this, I but two buttons on a form; one of them is to execute the stored procedure the other one is to cancel the query at any time by calling BreakExec command. I set the TMSQuery's NonBlocking property option to True. Everything works so far. The problem is occurs when i call the TMSQuery close method. It's waiting to catch rest of the rows. As you know, MS SQL Managment Query Window has this ability. You can execute a stored procedure witch is included huge dataset you can stop and close Query Window at any time you want without waiting to get residues. How can i do the same thing? How can i close TMSQuery without waiting to catch other records?

Waiting for your help,
Yours Sincerely

azyk
Devart Team
Posts: 1058
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TMSQuery hang on when you call close method

Post by azyk » Fri 25 Apr 2014 12:35

Hello,

This behaviour is due to the specificity of the OLEDB provider, it hangs on freeing resultset. We can't influence this behaviour.

Post Reply