Results 1 to 3 of 3

Thread: End of file problem

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    6

    End of file problem

    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?
    Last edited by lakhva; Apr 5th, 2005 at 04:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width