IF (@@error <> 0)
BEGIN
IF @@error <> 0
BEGIN
Set @intResultCode = @@error
Set @chvResultText = 'Error when registering the Station/Date. ' +
(SELECT description from master..sysmessages where error = @intResultCode and msglangid = 1033)
END
END
Because @@ERROR is cleared and reset on each statement executed, check it immediately following the statement being verified, or save it to a local variable that can be checked later. Source: MSDN
No comments:
Post a Comment
Be nice... it's the only internet we have.