Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to raise an error from a trigger

Status
Not open for further replies.

glenv

Programmer
Aug 19, 2002
6
PH
Hi,

How can i raise an error number and at the same time exit from the program itself if a statement
inside a trigger failed?

Thanks

Glen
 
Use RAISERROR command in the trigger followed by a RETURN statement.

If the trigger got invoked through a SQL command in a front-end like VB/PB/ASP, check for error conditions for the connection object and write the termination code accordingly. RT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top