The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> ASP Programming
|
Please Help! errorCode:80020009 Either BOF or EOF is true......
Discuss Please Help! errorCode:80020009 Either BOF or EOF is true...... in the ASP Programming forum on Dev Shed. Please Help! errorCode:80020009 Either BOF or EOF is true...... ASP Programming forum discussing Active Server Pages coding techniques and problem solving methods. Use VBScript or Jscript to make dynamic web applications.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 21st, 2011, 07:45 PM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 3
Time spent in forums: 42 m 31 sec
Reputation 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
%>
|

March 22nd, 2011, 12:52 AM
|
|
|
|
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
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
|

March 22nd, 2011, 01:56 AM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 3
Time spent in forums: 42 m 31 sec
Reputation 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
|

March 25th, 2011, 06:30 AM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 2
Time spent in forums: 55 m 14 sec
Reputation 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.
|

March 25th, 2011, 10:37 PM
|
|
Registered User
|
|
Join Date: Mar 2011
Posts: 3
Time spent in forums: 42 m 31 sec
Reputation 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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|