I'm having some problems using SqlDataReader in the
Microsoft.ApplicationBlocks.Data.SqlHelper class. In some cases it seems
that the cursor does not move, and I'm not sure what is causing this.
reader = SqlHelper.ExecuteReader(strConn, _
CommandType.StoredProcedure, "spGetSomeRecords", _
New SqlParameter("@id", id))
Do While reader.Read()
sometimes the reader does not advance the cursor and it results in an
endless loop
....
Loop
-or when I try-
If reader.hasrows()
sometimes reader does not advance the cursor to the first record, and I get
an error when I try to retrieve any data, i.e. reader("field")
....
end if