Print Page | Close Window

Stumped

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9624
Printed Date: 01 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Stumped
Posted By: twooly
Subject: Stumped
Date Posted: 07 February 2004 at 11:07pm

I am getting this error and I can't figure out why.  Can someone shed some light on this for me?

Thanks

Here is the error (I highlighted the line below)

ADODB.Field error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/scripts/quote/quote.asp, line 51

Here is the code

<mailto:%@LANGUAGE="VBSCRIPT"%'>%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connQuote.asp" -->

<%
' Declare the variables
Dim rsQuote
Dim rsQuote_numRows
Dim Number

' Make the Database connection and select the tables
Set rsQuote = Server.CreateObject("ADODB.Recordset")
rsQuote.ActiveConnection = MM_connQuote_STRING
rsQuote.Source = "SELECT * FROM Quote"
rsQuote.CursorType = 3
rsQuote.CursorLocation = 2
rsQuote.LockType = 1
rsQuote.Open()

rsQuote_numRows = 0

' Select a random recored in the database and storing it into the Number variables
Randomize
Number = (Int(RND * rsQuote.RecordCount))
' Move the cursor to the random quote in the database
rsQuote.Move Number

%>

<html>
<head>
<title>Quote</title>

<style>
a:link { text-decoration : underline; color : #666666 }
a:visited { text-decoration : underline; color : #666666 }
a:hover { text-decoration : underline; color : #000000 }
a.credit:link { text-decoration : underline; color : #FFFFFF }
a.credit:visited { text-decoration : underline; color : #FFFFFF }
td { text-decoration : none; color : #000000; font-family : arial; font-size : 9pt }
</style>

</head>

<body>
<%
' Display the quote in a table
%>
<table width="30%" border="0" cellspacing="2">
<tr>
    <td><em><b><%=(rsQuote.Fields.Item("Aut or").Value)%></b></em></td>
</tr>
  <tr>
    <td><%=(rsQuote.Fields.Item("Quote").Value)%>< ;/td>
  </tr>
 
</table>
</body>
</html>
<%
' Close the record set
rsQuote.Close()
Set rsQuote = Nothing
%>




Replies:
Posted By: Phat
Date Posted: 07 February 2004 at 11:21pm
Not sure about the EOF error but don't think ADO likes fields names with spaces in them.

Try Response.Write(rsQuote.Fields("Whatever_The_ID_Fields_Is") after rsQuote.Move to make sure you have a valid record.






Posted By: pmormr
Date Posted: 08 February 2004 at 2:33am
when it gives you an error about BOF or EOF (beginning of file or end of file) it normally means that you don't have anything in your recordset... make sure that you actually are selecting stuff when you open your recordset and that there are things in your database

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: twooly
Date Posted: 08 February 2004 at 8:38am

OK that space shouldn't be there.  Just got there when I typed.  I do have stuff in my database.  Because when I do my select I get this

 

 
    1 test test
  2 testteat teastet
    3 teatetatewt teasteateteatetaeteate

 

The reason I am stumped is I can do it on my test server just fine but not on my prod server.

 

Also I know the db is working because my other pages work just fine showing the records. (i.e.

<mailto:%@LANGUAGE="VBSCRIPT"%'>%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connQuote.asp" -->
<%
Dim rsQuotes
Dim rsQuotes_numRows

Set rsQuotes = Server.CreateObject("ADODB.Recordset")
rsQuotes.ActiveConnection = MM_connQuote_STRING
rsQuotes.Source = "SELECT * FROM Quote"
rsQuotes.CursorType = 0
rsQuotes.CursorLocation = 2
rsQuotes.LockType = 1
rsQuotes.Open()

rsQuotes_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsQuotes_numRows = rsQuotes_numRows + Repeat1__numRows
%>
<HTML><!-- InstanceBegin template="/Templates/Main.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="doctitle" -->
<TITLE>Quote Manager - Browse Quotes</TITLE>
<!-- InstanceEndEditable -->
<link href="styles.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</HEAD>
<BODY bgcolor="#999999">
<p class="credit">&nbsp;</p>
<TABLE WIDTH=600 height="138" border="1" ALIGN=CENTER CELLPADDING=1 CELLSPACING=0 bordercolor="#000000" BGCOLOR=FFFFFF>
  <TR WIDTH=600 BGCOLOR=COCOCO>
  
    <TD WIDTH=600 BGCOLOR=COCOCO>&nbsp; </TD>
 </TR>
 <TR WIDTH=600 BGCOLOR=990000>
  
    <TD WIDTH=600 BGCOLOR=990000>
      <table width="99%" border="0" cellspacing="5">
        <tr>
          <td height="78"><img src="images/logo.jpg" alt="Profile Manager Logo" width="200" height="60"></td>
          <td>&nbsp;</td>
        </tr>
      </table> </TD>
 </TR>
 <TR WIDTH=600 BGCOLOR=COCOCO>
  
    <TD WIDTH=600 BGCOLOR=COCOCO><!-- InstanceBeginEditable name="Top" --><!-- InstanceEndEditable -->
    </TD>
 </TR>
</TABLE>
<br>
<table width=600 border="1" align=CENTER cellpadding=1 cellspacing=0 bordercolor="#000000" bgcolor=990000>
  <tr width=600 bgcolor=990000>
    <td width=150 valign=TOP bgcolor=COCOCO class="credit"> <b>Menu :</b> <br>
      <a href="main.asp">Home</a><br>
      <a href="view.asp">Browse Quotes</a> <br>
      <a href="add.asp">Add Quote</a> <br>
      <a href="delete.asp">Delete Quote</a> <br>
      <a href="edit.asp">Edit Quote</a><br>
      <a href="admin.asp">Admin Settings</a> <br>
    </td>
    <td bgcolor=COCOCO width=450 valign=TOP> <div align="center"><br>
        <table border="0" cellspacing="0" cellpadding="0" width="103">
          <tr>
             <td height="16"><!-- InstanceBeginEditable name="Body_Heading" --><strong>Browse
               Quotes</strong> <!-- InstanceEndEditable --> </td>
          </tr>
        </table>
        <br>
        <br>
        <table width="100%" border="0" cellspacing="5">
          <tr>
             <td><!-- InstanceBeginEditable name="Body" -->
<table width="100%" border="0" cellspacing="5">
                 <tr>
                   <td width="37%"> <div align="center"><strong>Author Name<br>
                        </strong>
                        <hr width="60%" size="1">
                        <strong> </strong></div></td>
                   <td width="63%"> <div align="center"><strong>The Quote<br>
                        </strong>
                        <hr width="60%" size="1">
                        <strong> </strong></div></td>
           &nbs



Posted By: pmormr
Date Posted: 09 February 2004 at 7:39pm
did you make sure you updated the DB path and that you have IUSER read permissions on the database? it wouldn't normally give you that error but it's worth a look

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: twooly
Date Posted: 09 February 2004 at 7:59pm

It is a mySQL DB



Posted By: pmormr
Date Posted: 09 February 2004 at 8:03pm
oh..

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: zaboss
Date Posted: 10 February 2004 at 2:06am

If it's a mySQL db, then you should check the appropriate cursor values, as it has some issues with it, plus you may need to add an option to the connection string...

MyConn.Open = "driver=MySQL ODBC 3.51 Driver; SERVER=localhost; DATABASE=yourdb; UID=youruid; PWD=; Option=35"



-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net