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 2005 Forums
 Transact-SQL (2005)
 Where "Raiserror" will display in ASP.NET

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2010-02-03 : 12:07:02
If I call sp below in ASP.NET program, where "Raiserror" will display?

Create proc CheckValues
(
@pValue1 int,
@pValue2 int
)
as
Begin

if @pValue1 = 0 And @pValue2 = 0
begin
Raiserror('Values cannot be 0',16,1)
end
End

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-03 : 12:09:57
you can catch this error in your .net code
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-02-03 : 12:26:30
U can use .net SQLException class in ur catch block.

PBUH
Go to Top of Page
   

- Advertisement -