Here is my code. It is printing nothing. One of the If condition must be true. It should be either the End of the file(with no records from the stored procedure) or there should be some results.
set rsDates = Server.CreateObject("ADODB.Recordset")
rsDates.Open "sp_ReportLastLoadDates " & strParametersList, objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
if NOT rsDates.EOF then
Response.Write "you have found some records from database"
strLoad = rsDates("LoadDate")
end if
if rsDates.EOF then
Response.Write "NO RECORDS FOR DATES FOUND"
end if
If i write the folowing lines after my code
Response.Write "strLoad:" & strLoad & "<br>"
Then it only prints "strLoad:"
I also tried running the stored procedure sp_ReportLastLoadDates with passing paraments "strParametersList" in query analyzer and it gives me 1 record back from the database.
Can someone please explain me what is going on? It should be either end of the file or not the end of the file and it should print either "you have found some records from database" OR "NO RECORDS FOR DATES FOUND". But its printing nothing. Can someone please help me out?
