DaveMac1960
IS-IT--Management
Everyone,
I have a stored procedure that I call from .net that should be returing data rows. If I plug in the values manually, the stored procedure returns the correct data rows. When I run it from debug I can see the parameters I am passing are there, yet it doesn't return any data rows. Can someone please tell me the idiocy I must be doing.
Here's the stored procedure:
ALTER PROCEDURE dbo.Weekly_selSchedule_Stv
@prmdtmSelectedDate DateTime,
@prmCalendar varchar
AS
SELECT pd.DrInit,
ps.physicianID,
ps.headerID,
ps.schedDate,
ps.hospitalID,
ps.serviceID,
ps.calendarID,
ps.comments,
psvc.service
FROM PhyWeeklySchedule ps
INNER JOIN PhyDoctor pd ON ps.physicianID = pd.DrID
LEFT JOIN PhyCalType pct ON pct.caldate = ps.schedDate
LEFT JOIN phyWeeklyServices psvc ON ps.serviceID = psvc.headerID
WHERE ps.schedDate = @prmdtmSelectedDate AND ps.HospitalID = 'Stv @ Naab Road'
AND ps.calendarID = @prmCalendar
ORDER BY schedDate, DrInit
As I said, when I plug in the values manually it returns just what it is supposed to, yet calling it from .net returns nothing even though the parameters values are being populated. I would greatly appreciate any help.
Thanks in advance,
Dave
I have a stored procedure that I call from .net that should be returing data rows. If I plug in the values manually, the stored procedure returns the correct data rows. When I run it from debug I can see the parameters I am passing are there, yet it doesn't return any data rows. Can someone please tell me the idiocy I must be doing.
Here's the stored procedure:
ALTER PROCEDURE dbo.Weekly_selSchedule_Stv
@prmdtmSelectedDate DateTime,
@prmCalendar varchar
AS
SELECT pd.DrInit,
ps.physicianID,
ps.headerID,
ps.schedDate,
ps.hospitalID,
ps.serviceID,
ps.calendarID,
ps.comments,
psvc.service
FROM PhyWeeklySchedule ps
INNER JOIN PhyDoctor pd ON ps.physicianID = pd.DrID
LEFT JOIN PhyCalType pct ON pct.caldate = ps.schedDate
LEFT JOIN phyWeeklyServices psvc ON ps.serviceID = psvc.headerID
WHERE ps.schedDate = @prmdtmSelectedDate AND ps.HospitalID = 'Stv @ Naab Road'
AND ps.calendarID = @prmCalendar
ORDER BY schedDate, DrInit
As I said, when I plug in the values manually it returns just what it is supposed to, yet calling it from .net returns nothing even though the parameters values are being populated. I would greatly appreciate any help.
Thanks in advance,
Dave