CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Want to return a value if there is any error

Print topic Send  topic

Author Message
phalgunmungi

Posts: 1
Posted: 08/05/2008, 9:50 AM

This is the stored proc


ALTER procedure dbo.pmd_get_dnis

--==============================================================================--
-- Description : This procedure translates a DNIS into a set of data that --
-- describe that practice and physician that "own" this DNIS --
--==============================================================================--
(
@dnis char(10)
)
as
declare @str varchar(500)

select dn.practice_id, dn.physician_id, ph.first_name, ph.middle_initial, ph.last_name
from
pmd_dnis dn
join
pmd_physician ph
on
dn.physician_id = ph.physician_id
where dnis = @dnis

if @@error<>0
begin
set @str='pmd_get_dnis: error occured while running "select practice_id, physician_id, name..."'
raiserror (@str,1,2) with log
return(-1)
end
return(0)


I want to return -1 when there is error in accessing the stored proc from .net.
CAn anyone suggest a piece of code for that

Thanks

-Siva
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.