#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Please Help! errorCode:80020009 Either BOF or EOF is true......


    Hi all, and thank you in advance for all your help! I am not a good .asp programmer, but I have a project I'm trying to get finished and it involves an ASP website that a company uses for creating reservations. I built a new server for them and imported all of the information from the old server, set up IIS7 on the new server, MySQL 5.5 and upgraded to the MySQL ODBC driver version 5.1. Most everything went smooth, except for having to hunt down and update a bunch of connection strings, but I seem to be left with one issue. And I'm not exactly sure if it's something I set up wrong on the web hosting or mysql install, or if the old ASP code isn't compatible with the newer web and database software. Anyway, I'm getting a "either BOF or EOF is true, or the current recordset has been deleted" error, from a piece of javascript code that allows the users to update/change pieces of data in the database. It is a little popup window that has a few editable form fields, and when the user clicks "save" it is supposed to update the database and then automatically close the popup window. It is updating the database just fine, but instead of closing the popup window it just displays an internal 500 error and in my IIS7 error log it says it is error 80020009. here is the code, and I very much appreciate the help! thanks!

    Code:
    <%
    Dim MM_db_STRING
    MM_db_STRING = "Driver={MySQL ODBC 5.1 Driver}; Server=localhost; Database=suncityexpress; UID=sce_user; PWD=****; Option=3;"
    Dim voucher
    Dim voucher_cmd
    Dim voucher_numRows
    
    Set voucher_cmd = Server.CreateObject ("ADODB.Command")
    voucher_cmd.ActiveConnection = MM_db_STRING
    voucher_cmd.CommandText = "SELECT * FROM new_book WHERE id='"&Request.QueryString("trip")&"'" 
    voucher_cmd.Prepared = true
    
    Set voucher = voucher_cmd.Execute
    
    If Request.Form("book") <> "" Then
    
    theSql = "UPDATE new_book SET dropoff_at='"&Request.Form("doa")&"', customer_name='"&Replace(Request.Form("custName"), "'", "\'")&"', voucher='"&Request.Form("Ticket")&"', a_headcount='"&Request.Form("a_headcount")&"' WHERE id='"&Request.Form("book")&"'"
    
    theOtherSql = "UPDATE new_book SET voucher='"&Request.Form("Ticket")&"', last_edit='"&Session("userFullName")&"' WHERE riders_id='"&Request.Form("r_id")&"'"
    
    	'Response.Write(theSql)
    	'Response.End()
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_db_STRING
        MM_editCmd.CommandText = theSql
        MM_editCmd.Prepared = true
        MM_editCmd.Execute
    	MM_editCmd.CommandText = theOtherSql
        MM_editCmd.Prepared = true
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
    	Set MM_editCmd = Nothing
        Response.Write("<script>opener.location=""voucher.asp?id="&Request.Form("book")&"""; self.close();</script>")
    End If
    %>
    <style type="text/css">
    <!--
    body,td,th {
    	font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
    	font-size: 16px;
    }
    body {
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    -->
    </style><body bgcolor="#CAEEFF">
    <center>
    <b><u>Change Customer Information:</u></b><br />
    <form name="setDriver" method="post" action="cAddress.asp">
    <table cellpadding="3" cellspacing="0">
    	<tr>
        	<td align="right"><strong>Customer Name:</strong></td>
            <td align="left"><input type="text" name="custName" value="<%=voucher("customer_name")%>"></td>
        </tr>
        <tr>
        	<td align="right"><strong>Airport:</strong></td>
            <td align="left"><input type="text" name="doa" value="<%=voucher("dropoff_at")%>"></td>
        </tr>
        <tr>
        	<td align="right"><strong>Ticket Voucher:</strong></td>
            <td align="left"><input type="text" name="Ticket" value="<%=voucher("voucher")%>"></td>
        </tr>
        <tr>
        	<td align="right"><strong>Headcount:</strong></td>
            <td align="left"><input type="text" name="a_headcount" value="<%=voucher("a_headcount")%>"></td>
        </tr>
    </table>
    <br />
    <input type="hidden" name="r_id" value="<%=voucher("riders_id")%>">
    <input type="hidden" name="book" value="<%= Request.QueryString("trip") %>">
    <input type="hidden" name="way" value="<%=Request.QueryString("way")%>">
    <input type="submit" value="Save" />
    </form>
    </center>
    <%
    voucher.Close()
    Set voucher = Nothing
    %>
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,442
    Rep Power
    4539
    The error message should identify the line of code that generated the error. Please identify the error code line. And in IE, turn off the 'show friendly http errors' setting and you should get a detailed error message in the browser instead of just a 500 error.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0
    Thank you for the quick response! in the error page (xml file that IIS creates) on the error line it says "line 0". I can't imagine that the first line of code is bad.. I did turn 'show friendly errors' off, but it doesn't give me any detailed information.. still shows the 500 error page. I printed a pdf of the error log and since I can't attach it here, I uploaded it to www . vertex21 . com /files/fr000148.pdf
    Hopefully that'll help.. sorry for the messed up link, but it wouldn't allow me to post URLs.. Thanks so much!

    Mike
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0
    Hi,
    Are you sure that your SQL..
    voucher_cmd.CommandText = "SELECT * FROM new_book WHERE id='"&Request.QueryString("trip")&"
    Is returning a row? your using vouchers("field name") in the form but your not checking that it actually found a row.
    Just a thought.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0
    Thank you all for the replies, but I found the problem. It was as simple as me not having restored one of the tables. I added the table back in, and it worked great! thanks again though, and sorry for wasting any time..

    Mike

IMN logo majestic logo threadwatch logo seochat tools logo