
April 14th, 2003, 05:05 PM
|
|
Registered User
|
|
Join Date: Apr 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Missing SqlDataReader
Just doing some experimenting with Webservices and I seem to have run into a snag. <br><div class="msgQuoteWrap"><div class="msgCode"><br> Dim dr As SqlDataReader = oHours.FetchTOEmpHoursMax(sEmp, oCnn)<br> While dr.Read<br> mxSick = dr("sicktime")<br> mxVac = dr("vacationtime")<br> End While<br></div></div><br>for some reason, my dr is coming back as nothing. here's the FetchTOEmpHoursMax code<br><div class="msgQuoteWrap"><div class="msgCode"><br> Public Function FetchTOEmpHoursMax(ByVal sEmp As String, ByVal oCnn As SqlConnection) As SqlDataReader<br> Dim sPArray(0) As SqlParameter<br> Try<br> sPArray(0) = New SqlParameter("@emp", sEmp)<br> FetchTOEmpHoursMax = SqlHelper.ExecuteReader(oCnn.ConnectionString, CommandType.StoredProcedure, "Fetch_Emp_HoursMax", sPArray)<br> Catch ex As Exception<br> ExceptionManager.Publish(ex)<br> Throw ex<br> End Try<br> End Function<br></div></div><br><br>I know my sproc is ok, as i've tested in and it works. In fact this function has been cut and pasted from another page that works fine. Yet for some reason this function only returns nothing. Anybody got any ideas? <img border="0" src="/forum/emoticons/sad.gif" height="15" width="15" alt="sad" />
|