Bof eof error please help!!!!!

Results 1 to 3 of 3

Thread: Bof eof error please help!!!!!

  1. #1
    Join Date
    Dec 1969

    Default Bof eof error please help!!!!!

    I&#039m trying to return information from a search condition on a previous asp page. When I hit on one of the returned values the following page should display the query info. I put in the response.write it returned the value (projectID=0) of 0 when it should have been 1. The actual page comes up like this (the select statement is obviously just from the response.write) There should be another 10 or so fields after the project name field populated. Can anyone tell me why I&#039m getting the bof, eof error. There is a record in the db with the info so the record hasn&#039t been deleted. Thanks for looking at my problem. Please help<BR><BR><BR>Select * from tbl_Projects WHERE ProjectID = 0 <BR>View Project Detail<BR>Edit Project Delete Project<BR><BR><BR>Project ID: <BR>Client ID: 2 <BR>Project Name: ADODB.Field error &#039 80020009&#039 <BR><BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record. <BR><BR>? <BR> <BR><BR>set cnn=server.CreateObject("ADODB.Connection")<BR>cnn .Open "FILEDSN=New.dsn"<BR>id = Cint(Request("ProjectID"))<BR>sql= "Select * "<BR>sql=sql & "from tbl_Projects "<BR>sql=sql & "WHERE ProjectID = " & id<BR><BR>Response.write sql<BR><BR>set rs=cnn.Execute(sql)

  2. #2
    Join Date
    Dec 1969

    Default RE: Bof eof error please help!!!!!

    Maybe the data is empty (null) and when you run it through CInt it converts it to zero. Run response.write(request.form("ProjectID")) and see what the output is.<BR><BR>Hope this helps.<BR><BR>Ben

  3. #3
    truong Guest

    Default RE: Bof eof error please help!!!!!

    When you want to navigate up and down the recordset you should define its cursortype. It should be adOpenDynamic or adOpenStatic. If you have not defined this the default cursor type with be adOpenForwardOnly which means you can not search up and down the recordset. Try to add this line right after you initiate the recordset<BR>set rs = server.createobject("ADODB.Recordset")<BR> -- rs.cursortype = adOpenStatic (or 3 if you don&#039t have this line at the beginning &#060;!-- #include file/ --&#062;<BR>Of course you have to have the in your root.

Posting Permissions

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