Solved

Repeat Region and ADODB.Field error '800a0bcd'

Posted on 2002-03-28
17
9,248 Views
Last Modified: 2013-12-24
I have an ultradev 'Results' page that comes up with the same error whenever I bring it up in a browser.  The complete error message follows:

----------------------------------------------------
ADODB.Field error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record.

/waternet/projects/Detail.asp, line 396
------------------------------------------------------

I have narrowed this problem down as being linked to a Repeat region behavior on the page.  There is a UD table on the page that contains the repeat region.  When this page is displayed on the web, the error message always follows the table with the repeat region and the rest of the data on the page will not display.  If I remove the Repeat region behavior, the data on the page displays fine, but I do not get the repeating that is needed.  Does anyone know the cause of this?
0
Comment
Question by:amberbock
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 7
17 Comments
 
LVL 5

Expert Comment

by:andriv
ID: 6905109
Post that part of the script
0
 

Author Comment

by:amberbock
ID: 6905676
I ran across this in comments to other questions.  What does "post that part of the script" mean?  I am not familiar with the term (post) in this context.
0
 
LVL 5

Expert Comment

by:andriv
ID: 6905686
Paste the script so we can look at the syntax for errors.
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

Author Comment

by:amberbock
ID: 6905701
Is this enough?  This is all from the table that contains the repeat region.        


               <td width="50%"><font face="Arial, Helvetica, sans-serif"><b><A HREF="PIDetail.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & rsDetail.Fields.Item("PIID").Value %>"><%=(rsDetail.Fields.Item("PIName").Value)%></A></b></font></td>
                      <tr bgcolor="ddeeee">
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("Advisor").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("GradStudent").value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                      </tr>
                      <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsDetail.MoveNext()
0
 

Author Comment

by:amberbock
ID: 6905709
Is this enough?  This is all from the table that contains the repeat region.        


               <td width="50%"><font face="Arial, Helvetica, sans-serif"><b><A HREF="PIDetail.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & rsDetail.Fields.Item("PIID").Value %>"><%=(rsDetail.Fields.Item("PIName").Value)%></A></b></font></td>
                      <tr bgcolor="ddeeee">
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("Advisor").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("GradStudent").value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                      </tr>
                      <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsDetail.MoveNext()
0
 

Author Comment

by:amberbock
ID: 6905778
Is this enough?  This is all from the table that contains the repeat region.        


               <td width="50%"><font face="Arial, Helvetica, sans-serif"><b><A HREF="PIDetail.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & rsDetail.Fields.Item("PIID").Value %>"><%=(rsDetail.Fields.Item("PIName").Value)%></A></b></font></td>
                      <tr bgcolor="ddeeee">
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("Advisor").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("GradStudent").value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                      </tr>
                      <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsDetail.MoveNext()
0
 

Author Comment

by:amberbock
ID: 6905830
Is this enough?  This is all from the table that contains the repeat region.        


               <td width="50%"><font face="Arial, Helvetica, sans-serif"><b><A HREF="PIDetail.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & rsDetail.Fields.Item("PIID").Value %>"><%=(rsDetail.Fields.Item("PIName").Value)%></A></b></font></td>
                      <tr bgcolor="ddeeee">
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("Advisor").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("GradStudent").value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                      </tr>
                      <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsDetail.MoveNext()
0
 
LVL 5

Expert Comment

by:andriv
ID: 6905859
Let me take a look but I have to finish something up before I do.
0
 

Author Comment

by:amberbock
ID: 6905880
Is this enough?  This is all from the table that contains the repeat region.        


               <td width="50%"><font face="Arial, Helvetica, sans-serif"><b><A HREF="PIDetail.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & rsDetail.Fields.Item("PIID").Value %>"><%=(rsDetail.Fields.Item("PIName").Value)%></A></b></font></td>
                      <tr bgcolor="ddeeee">
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("Advisor").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.fields.item("GradStudent").value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                      </tr>
                      <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsDetail.MoveNext()
0
 

Author Comment

by:amberbock
ID: 6905955
Sorry, I didn't mean to post that so many times....kept "refreshing" my browser.....oops.
0
 
LVL 5

Expert Comment

by:andriv
ID: 6906099
I think I may have found the problem.  fields is a variable name and you have a lower case 'f' in all of them but in the first line below you have a capitol 'F'. Try changing to lower case

 <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                       </td>
                       <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                         <%If (CStr(rsDetail.fields.item("Advisor").Value) = CStr("True"))

If this is not it then I will need the whole code for the page so I can copy and paste it into my UltraDev to get line numbers to narrow it down.
0
 

Author Comment

by:amberbock
ID: 6906168
I tried the capitalization and the error remains the same.  
I did not include the WHOLE page in order to protect privacy, but I included the beginning stuff and then the whole UD table that includes all the server behaviors and data on the page.


<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/connProjects.asp" -->
<%
Dim rsDetail__varRptNum
rsDetail__varRptNum = "1"
if (Request.QueryString("RptNum") <> "") then rsDetail__varRptNum = Request.QueryString("RptNum")
%>
<%
set rsDetail = Server.CreateObject("ADODB.Recordset")
rsDetail.ActiveConnection = MM_connProjects_STRING
rsDetail.Source = "SELECT *  FROM qryDetail_new  WHERE ReportNum = '" + Replace(rsDetail__varRptNum, "'", "''") + "'"
rsDetail.CursorType = 0
rsDetail.CursorLocation = 2
rsDetail.LockType = 3
rsDetail.Open()
rsDetail_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsDetail_numRows = rsDetail_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<html>
<head>
<title>Project Details</title>
<script language="JavaScript">

<table border="0" cellpadding="0" cellspacing="0" bgcolor="#CC6600" width="100%">
        <tr valign="top">
          <td valign="top" width="10"><img src="../../images/blank.gif" width="10" height="20"></td>
          <td valign="top" align="left" colspan="2">
            <h2 align="center"><font face="Arial, Helvetica, sans-serif"><br>
              <font color="ffe9bb">Project Details for Report Number</font><font color="#FFFFFF">
              <font color="#660000"><b><%=(rsDetail.Fields.Item("ReportNum").Value)%><br>
              <br>
              </b></font></font></font></h2>
          </td>
          <td width="10"><img src="../../images/blank.gif" width="10" height="20"></td>
        </tr>
        <tr valign="top">
          <td valign="top" width="10" height="768">&nbsp;</td>
          <td valign="top" align="center" colspan="2" height="768">
            <table width="80%" border="0" cellpadding="3" align="center" bgcolor="ffe9bb" bordercolor="cc3300" height="741">
              <tr>
                <td>
                  <table width="90%" border="0" cellpadding="3" align="center" cellspacing="3" bgcolor="#999999">
                    <tr bgcolor="99cccc">
                      <td width="20%">
                        <div align="left"><font face="Arial, Helvetica, sans-serif"><b>Project
                          Title</b></font></div>
                      </td>
                      <td width="80%" bgcolor="ddeeee">
                        <div align="left"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("ProjectTitle").Value)%></font></div>
                      </td>
                    </tr>
                  </table>
                  <div align="center"><font face="Arial, Helvetica, sans-serif"><br>
                    </font>
                    <table width="90%" border="0" cellpadding="3" cellspacing="3" bgcolor="#999999">
                      <tr>
                        <td valign="top" width="20%" height="30" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Center
                          Program</b></font></td>
                        <td valign="top" colspan="3" height="30" bgcolor="ddeeee">
                          <p><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("CenterProgram").Value)%><br>
                            </font></p>
                        </td>
                      </tr>
                      <tr>
                        <td valign="top" width="20%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Begin
                          Date</b></font></td>
                        <td valign="top" width="30%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("BeginDate").Value)%></font></td>
                        <td valign="top" width="20%" bgcolor="#99CCCC"><font face="Arial, Helvetica, sans-serif"><b>Year
                          Published</b></font></td>
                        <td valign="top" width="30%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("YearPublished").Value)%></font></td>
                      </tr>
                      <tr>
                        <td valign="top" width="20%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>End
                          Date</b></font></td>
                        <td valign="top" width="30%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("EndDate").Value)%></font></td>
                        <td valign="top" width="20%" bgcolor="#99CCCC"><font face="Arial, Helvetica, sans-serif"><b>Pages</b></font></td>
                        <td valign="top" width="30%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("NumofPages").Value)%></font></td>
                      </tr>
                    </table>
                    <font face="Arial, Helvetica, sans-serif"><br>
                    </font>
                    <table width="90%" border="0" cellpadding="3" align="center" bgcolor="#999999" cellspacing="3">
                      <tr bgcolor="99cccc">
                        <td bgcolor="99cccc" width="50%"><b><font face="Arial, Helvetica, sans-serif">Partner
                          <br>
                          </font></b></td>
                        <td width="17%"><b><font face="Arial, Helvetica, sans-serif">Principal
                          Investigator?</font></b></td>
                        <td width="17%"><b><font face="Arial, Helvetica, sans-serif">Advisor?</font></b></td>
                        <td width="17%"><b><font face="Arial, Helvetica, sans-serif">Graduate
                          Student?</font></b></td>
                      </tr>
                      <%
While ((Repeat1__numRows <> 0) AND (NOT rsDetail.EOF))
%>
                      <tr bgcolor="ddeeee">
                        <td width="50%"><font face="Arial, Helvetica, sans-serif"><b><a href="PIDetail.asp?<%= MM_keepURL & MM_joinChar(MM_keepURL) & "id=" & rsDetail.Fields.Item("PIID").Value %>"><%=(rsDetail.Fields.Item("PIName").Value)%></a></b></font></td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("PI").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("Advisor").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                        <td width="17%"><font face="Arial, Helvetica, sans-serif"></font>
                          <%If (CStr(rsDetail.Fields.Item("GradStudent").Value) = CStr("True")) Then Response.Write("Yes")%>
                        </td>
                      </tr>
                      <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsDetail.MoveNext()
Wend
%>
                    </table>
                    <font face="Arial, Helvetica, sans-serif"><br>
                    </font></div>
                  <div align="center">
                    <table width="90%" border="0" cellpadding="3" cellspacing="3" bgcolor="#999999">
                      <tr>
                        <td valign="top" width="20%" height="28" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Abstract</b></font></td>
                        <td height="28" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("Abstract").Value)%></font></td>
                      </tr>
                    </table>
                    <p>&nbsp;</p>
                    <table width="90%" border="0" cellpadding="3" cellspacing="3" bgcolor="#999999">
                      <tr>
                        <td width="20%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Watershed</b></font></td>
                        <td width="39%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("ProjectWatershed").Value)%></font></td>
                        <td width="12%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Latitude</b></font></td>
                        <td width="31%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("ProjectLatitude").Value)%></font></td>
                      </tr>
                      <tr>
                        <td width="20%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>HUC</b></font></td>
                        <td width="39%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("ProjectHUC").Value)%></font></td>
                        <td width="12%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Longitude</b></font></td>
                        <td width="31%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("ProjectLongitude").Value)%></font></td>
                      </tr>
                      <tr>
                        <td width="20%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Web
                          Link</b></font></td>
                        <td width="39%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><a href="<%=(rsDetail.Fields.Item("WebLink").Value)%>"><b><%=(rsDetail.Fields.Item("WebLink").Value)%></b></a></font></td>
                        <td width="12%" bgcolor="99cccc"><font face="Arial, Helvetica, sans-serif"><b>Notable
                          Achievements</b></font></td>
                        <td width="31%" bgcolor="ddeeee"><font face="Arial, Helvetica, sans-serif"><%=(rsDetail.Fields.Item("NotableAchievements").Value)%></font></td>
                      </tr>
                    </table>
                    <br>
                 
                    <p><font face="Arial, Helvetica, sans-serif"><a href="search.asp"><b>New
                      Search</b></a></font></p>
                  </div>
                  <p align="center"><b><font face="Arial, Helvetica, sans-serif"><a href="browse.asp">Browse
                    Projects</a><br>
                    </font></b></p>
                </td>
              </tr>
            </table>
            <p>&nbsp;</p>
          </td>
          <td width="10" height="768">&nbsp;</td>
        </tr>
      </table>
     

0
 
LVL 5

Expert Comment

by:andriv
ID: 6907747
For good reason you only gave me to line 226 but the error is on 396.  What exactly do you have on line 326?

the possible problems for the error message you are getting (below) are:

1) One of you records has empty field.

2) You are not using a while(there are records) loop (similar to that of While ((Repeat1__numRows <> 0) AND (NOT rsDetail.EOF)) from the script you provided) If this is the case then it's trying to retrieve addition records that does not exist

3) You deleted a record and the id does not exist, to remedy this you need to use something similar to:

if(query){do something}

The Repeat1__index=Repeat1__index+1 is not really good code if you are using it in the where clause:

select * from table where id = Repeat1_index

because if you have delete a record (for example record id 3) when the loop gets to 3 you will get an error:

select * from table where id = 3

this would return null causing an error in your script.


----------------------------------------------------
ADODB.Field error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application
requires a current record.

/waternet/projects/Detail.asp, line 396
------------------------------------------------------

Hope this helps
0
 

Author Comment

by:amberbock
ID: 6914174
Thanks for trying to help.  I remedied the problem.  I put the data that needed the repeat region in a separate recordset.  That seemed to work.  I appreciate your effort.

amberbock
0
 
LVL 5

Expert Comment

by:andriv
ID: 6914204
No problem, I'm glad you got it solved.
0
 
LVL 5

Expert Comment

by:andriv
ID: 6914229
What you do to delete this questions and restore your points is go to the community area:

http://www.experts-exchange.com/commspt/

and submit a 0 point question and request to have this question deleted. Provide this link and they will review the question and return your points.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 6922037
Points refunded and placed in PAQ.

Computer101
E-E Moderator
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question