Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9262
  • Last Modified:

Repeat Region and ADODB.Field error '800a0bcd'

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
amberbock
Asked:
amberbock
  • 9
  • 7
1 Solution
 
andrivCommented:
Post that part of the script
0
 
amberbockAuthor Commented:
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
 
andrivCommented:
Paste the script so we can look at the syntax for errors.
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
amberbockAuthor Commented:
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
 
amberbockAuthor Commented:
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
 
amberbockAuthor Commented:
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
 
amberbockAuthor Commented:
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
 
andrivCommented:
Let me take a look but I have to finish something up before I do.
0
 
amberbockAuthor Commented:
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
 
amberbockAuthor Commented:
Sorry, I didn't mean to post that so many times....kept "refreshing" my browser.....oops.
0
 
andrivCommented:
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
 
amberbockAuthor Commented:
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
 
andrivCommented:
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
 
amberbockAuthor Commented:
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
 
andrivCommented:
No problem, I'm glad you got it solved.
0
 
andrivCommented:
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
 
Computer101Commented:
Points refunded and placed in PAQ.

Computer101
E-E Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 9
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now