The HP compiler was smart enough not to call this a fatal error: it simply issued a warning and went on compiling that particular module without optimization. Fatal error c1007 error executing fl32 exe. BTW, we both have the same limited of computer, same OS, same iTunes hay, and same situation OS.
-->Returns the error number for the last Transact-SQL statement executed.
integer
Returns 0 if the previous Transact-SQL statement encountered no errors.
Returns an error number if the previous statement encountered an error. If the error was one of the errors in the sys.messages catalog view, then @@ERROR contains the value from the sys.messages.message_id column for that error. You can view the text associated with an @@ERROR error number in sys.messages.
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.
Use the TRY..CATCH construct to handle errors. The TRY..CATCH construct also supports additional system functions (ERROR_LINE, ERROR_MESSAGE, ERROR_PROCEDURE, ERROR_SEVERITY, and ERROR_STATE) that return more error information than @@ERROR. TRY..CATCH also supports an ERROR_NUMBER function that is not limited to returning the error number in the statement immediately after the statement that generated an error. For more information, see TRY..CATCH (Transact-SQL).
The following example uses @@ERROR
to check for a check constraint violation (error #547) in an UPDATE
statement.
The following example uses IF..ELSE
statements to test @@ERROR
after an DELETE
statement in a stored procedure. The value of the @@ERROR
variable determines the return code sent to the calling program, indicating success or failure of the procedure.
The following example uses @@ERROR
with @@ROWCOUNT
to validate the operation of an UPDATE
statement. The value of @@ERROR
is checked for any indication of an error, and @@ROWCOUNT
is used to ensure that the update was successfully applied to a row in the table.
TRY..CATCH (Transact-SQL)
ERROR_LINE (Transact-SQL)
ERROR_MESSAGE (Transact-SQL)
ERROR_NUMBER (Transact-SQL)
ERROR_PROCEDURE (Transact-SQL)
ERROR_SEVERITY (Transact-SQL)
ERROR_STATE (Transact-SQL)
@@ROWCOUNT (Transact-SQL)
sys.messages (Transact-SQL)
Errors and Events Reference (Database Engine)