Skip to main content
Inspiring
October 18, 2006
Question

cfstoredproc.statusCode vs. @@Error

  • October 18, 2006
  • 2 replies
  • 635 views
When you execute a stored procedure using cfstoredproc and set
returncode="yes", does the variable cfstoredproc.statusCode return the last
known @@Error SQL Server value?


This topic has been closed for replies.

2 replies

Inspiring
October 19, 2006

"MikerRoo" <webforumsuser@macromedia.com> wrote in message
news:eh6btn$1ed$1@forums.macromedia.com...
> No.
> Only if you return it. IE. "RETURN @@ERROR".
>

That's what I thought. I actually return a variable containing @@ERROR.

So then does the returncode indicate wether or not the procedure even ran?


October 19, 2006
quote:

Originally posted by: Newsgroup User
>> So then does the returncode indicate wether or not the procedure even ran?



Sort of. If the SP runs, then the return code will be 0 or whatever you set it to.
If the SP doesn't run, the return code is not defined and you will have an exception thrown.


October 18, 2006
No.
Only if you return it. IE. "RETURN @@ERROR".