Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Raiserror Function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-19 : 08:55:44
Vishal Shah writes "Dear Gurus,

i have am using Visual Basic 6.0 as front end and
sql server 2000 as back end.

i have writen a stored procedure in sql server 2000
and am calling it from front end.

i want to know how to use RAISERROR function in back end
to know if any error has occured while executing the
back end stored procedure.


Thanks
Vishal Shah"

royv
Constraint Violating Yak Guru

455 Posts

Posted - 2001-12-19 : 10:08:17
Books OnLine describes it very well.

*************************
Just trying to get things done
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2001-12-19 : 15:14:02
raiserror('statement failed',16,-1)

You will need a test after every statement

insert tbl
if @@error <> 0
begin
raiserror('statement failed',16,-1)
return
end


==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -