February 9, 2004 at 5:56 pm
I have a question about using print. I put some print statement in an stored proc so I could monitor the progress of a long running email. If NoCount is Off everything is fine. The problem is when I turn "NoCount On". I don't get any results until the SP finishes. Is there any way to flush the buffer back so that incremental results can be viewed?
February 9, 2004 at 6:05 pm
I prefer to use a logging table instead. Simply insert the records into the logging table and then when you want to check the status select from the log table using the NOLOCK hint. Works pretty well for me!
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
February 10, 2004 at 2:44 am
Why you want to view the progress if you decided to set NOCOUNT ON?
Regards,
kokyan
February 10, 2004 at 9:46 am
I figured this out. If I turn No Count off and then back on again. It flushes the buffer.
February 11, 2004 at 1:51 am
use select instead of print
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply