Page 1 of 1

Asynchronous execution

Posted: Thu 28 May 2015 07:45
by AntonPlotnikov
Hello.

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

Re: Asynchronous execution

Posted: Tue 02 Jun 2015 12:36
by azyk
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: https://www.devart.com/sdac/docs/#devar ... essage.htm

To learn how to implement asynchronous transfer of SQL Server info messages, read the MSDN blog: https://social.msdn.microsoft.com/Forum ... -displayed