Link to home
Start Free TrialLog in
Avatar of dhnkley
dhnkley

asked on

SQL Messages from a Executing Stored Procedure in Delphi

I have a large Stored Procedure in Microsoft SQL Server 2000 which is fired from a Delphi 7 App.

Is there a way of getting the messages, Like what is displayed in the Microsoft SQL Query Analyzer messages panel, in real time.

Becuase of the long execution time of the procedure it would be great to get the feedback as to the procedure is actually doing something

Cheers
Darren



Avatar of Ivanov_G
Ivanov_G
Flag of Bulgaria image

I am not sure you can implement what you want. One possible solution is to create e temporary table, for e.g.:

CREATE TABLE PROC_TMP_RESULT
(
  MSG VARCHAR(255)
)

from inside your procedure, while it is being executed, you can make some INSERT into this table and read the message from the table...
If you use ADO and want to catch "print" statements, you can you the solution I gave here:

https://www.experts-exchange.com/questions/20961933/Ado-vs-MSSQL-7-2k-and-backup-restore-500.html

The TADOConnectio.OnInfoMessage event.

Regards Jacco
ASKER CERTIFIED SOLUTION
Avatar of BlackTigerX
BlackTigerX

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial