Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Stumped
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Stumped

 Post Reply Post Reply
Author
twooly View Drop Down
Groupie
Groupie


Joined: 24 September 2003
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote twooly Quote  Post ReplyReply Direct Link To This Post Topic: Stumped
    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

<%@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
%>

Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post 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.




Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
twooly View Drop Down
Groupie
Groupie


Joined: 24 September 2003
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote twooly Quote  Post ReplyReply Direct Link To This Post 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.

<%@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

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
twooly View Drop Down
Groupie
Groupie


Joined: 24 September 2003
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote twooly Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2004 at 7:59pm

It is a mySQL DB

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2004 at 8:03pm
oh..
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.