Asynchronous execution

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Thu 28 May 2015 07:38

Asynchronous execution

Post by AntonPlotnikov » Thu 28 May 2015 07:45


How can I run a long running stored procedure in asynchronous mode? In addition I want receive SQL Server prints during batch execution. I tried to use NonBlocking option of TMSQuery but execution was synchronous anyway

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

Re: Asynchronous execution

Post by azyk » Tue 02 Jun 2015 12:36

To execute a stored procedure in the asynchronous mode, use the TMSSQL component. Before calling the TMSSQL.Execute method, set the TMSSQL.NonBlocking property to True.

To retrieve SQL Server info messages in SDAC, you can use the TMSConnection.OnInfoMessage event handler. This event will be generated when executing a query with TMSQuery, TMSStoredProc. Refer our online documentation for more details about this event: ... essage.htm

To learn how to implement asynchronous transfer of SQL Server info messages, read the MSDN blog: ... -displayed

Post Reply