Results 1 to 3 of 3

Thread: What am I missing?

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Question What am I missing?

    Pretty strightforward...

    Code:
    sqlstaffprofile = "SELECT * FROM staff WHERE staffid = " & staffid & ";"
    
    objrs.Open sqlstaffprofile,objconn
    
    if not objrs.BOF or objrs.EOF then
    
    
    
    %>
    
    
    <table width="462">
            <tr>
    'SNIP SNIP SNIP
    
            </tr>
          </table>
    
    <P>&nbsp;</P>
    
    <%
    else
    Response.Write "No Records Found for that Staff ID"
    end if
    
    end if
    %>
    Instead of my message, I get

    ADODB.Field error '80020009'

    Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record.

    ?

  2. #2
    Lively Member blackeyed's Avatar
    Join Date
    Nov 2002
    Location
    Chandigarh
    Posts
    118
    i guess you are not getting any record for this condition. so do one thing put the condition in the brackets or simply replace your code with this code. You have just missed a thorn in the sight.


    if not (objrs.BOF or objrs.EOF) then
    ~~Avi~~

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Oh man.. sometimes I miss the smallest things. I need coffee..

    Thanks.

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