We have a really long, complicated stored procedure and, for tracking its progress, we have added PRINT statements showing the current location of the execution.
Like this:
[pre]-- Do long SELECT into temp table
PRINT 'Location 1'
-- Update temp table via loop
PRINT 'Location 2'
-- Sequentially loop through temp table and INSERT into temp2
PRINT 'Location 3'
...
[/pre]
When there is an error on the web page, instead of getting the actual error, we get the text of one of the PRINT statements, which is helpful for finding the problem, but not for letting us know what it is. It really came to light when it was only happening for a particular user due to that user's permissions.
I would like to see what the actual error message is. The location is nice, but the error is more important.
What do I need to fix?
Like this:
[pre]-- Do long SELECT into temp table
PRINT 'Location 1'
-- Update temp table via loop
PRINT 'Location 2'
-- Sequentially loop through temp table and INSERT into temp2
PRINT 'Location 3'
...
[/pre]
When there is an error on the web page, instead of getting the actual error, we get the text of one of the PRINT statements, which is helpful for finding the problem, but not for letting us know what it is. It really came to light when it was only happening for a particular user due to that user's permissions.
I would like to see what the actual error message is. The location is nice, but the error is more important.
What do I need to fix?