Solved

Repeat Region and ADODB.Field error '800a0bcd'

Posted on 2002-03-28
17
9,233 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
  • 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now