Either EOF or BOF is true

Results 1 to 2 of 2

Thread: Either EOF or BOF is true

  1. #1
    Srilatha Guest

    Default Either EOF or BOF is true

    I am trying to retrieve a record set for a particular condition from SQL database. My code goes like this -<BR><BR>If Not RunSQL("SELECT * FROM MEMBERS WHERE" & _<BR> " Email=&#039" & Session("email") & "&#039 AND" & _<BR> " PASSWORD=&#039" & Session("pass1") & "&#039") Then Response.End<BR><BR>If rs.BOF=true or rs.EOF=true Then<BR> Response.Write "Invalid email id or password"<BR>Else<BR> Session("memid") = rs("MemberID")<BR>End If<BR><BR>The response.end is not executed but somehow the eof or bof occurs and an "invalid email or password" is executed.<BR>The record set is being found because otherwise the code should have terminated at response.end.<BR><BR>I am not able to make out why the cursor is at eof. Any ideas.<BR>Pls. can someone help me out.<BR>Thanks

  2. #2
    Manoj Guest

    Default RE: Either EOF or BOF is true

    Hello,<BR>Your code is some what wrong, because the Select query u are writing is not opened in a recordset (u&#039re rs as recordset). If u assign the select query result to resultset(rs) the other code may be ok.<BR> Just change the code as<BR> set rs=new adodb.recordset<BR> rs.open "select ............<BR> if rs.recordcount=0 then<BR> Response.end<BR> end if<BR> if rs.eof..........<BR><BR>........................<B R>Thanks<BR>

Posting Permissions

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