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)
 Problem with RaiseError

Author  Topic 

khufiamalik
Posting Yak Master

120 Posts

Posted - 2008-10-24 : 04:03:42
Hello All,
I have a Sp and I am raising Error on a condition. like
if @lEmpFound=1
RAISERROR('Employee Already Exists' ,11 ,1)


this works fine when i execute this Sp from SQL Server 2005 Management Studio and raises error with message

Employee Already Exists


But When I run this from my ASP.NET application
it gives error like this.

Employee Already Exists Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.


Can any one help me that how can I get the original error which i had raised from SP.

Thanks in advance

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-10-24 : 04:08:48
Duplicate
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=113198
Go to Top of Page
   

- Advertisement -