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
|
|
|
|