SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Handling Exceptions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 07/22/2000 :  12:08:12  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
naren writes "How to write The exceptions and error handling in SQL Server 7.0. Please send it as early as possible. Thank u"

Article Link.

Anonymous
Starting Member

0 Posts

Posted - 11/16/2000 :  10:58:38  Show Profile  Reply with Quote
Save a line.

Instead of having set the error to a variable
insert authors (au_id)
values ('172-32-1176')
Select @iError=@@error
If @iError <> 0
Print 'Error' -- Do your error handling here

Try just
insert authors (au_id)
values ('172-32-1176')
If @@Error <> 0
Print 'Error' -- Do your error handling here




Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000