|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 --
declare @str varchar(500)
select dn.practice_id, dn.physician_id, ph.first_name, ph.middle_initial, ph.last_name
dn.physician_id = ph.physician_id
where dnis = @dnis
set @str='pmd_get_dnis: error occured while running "select practice_id, physician_id, name..."'
raiserror (@str,1,2) with log
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