I am querying a sql server db from asp/ado. I am trying to get data from a list of people but all of them may not have the data I am looking for. As a result, when the query gets to that person/record, I get the message:
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
How can I avoid this message? Here is my code:
sql="SELECT TrngDate, Effort, UnitMeas FROM TrainingData WHERE PartID = " & CLng(iPartID)
rs.Open sql, conn, 1, 2
Originally posted by Satya
Check this KBA and get the fix if required.
Also check whether that would be a closed recordset while error was returned. And also check whether second RS is opened/returned.
But it doesn't appear that the problem referred to is my issue. My issue is that the record that I am looking for may in fact not exist. I am not sure how to determine that before 'looking' for it. Is there any way I can get a record count? In the past I have tried this and it returns a recordcount of -1.