Forums

ASP

This topic is locked

ADODB.Field error '800a0bcd' Please help

Posted 15 May 2006 13:23:57
1
has voted
15 May 2006 13:23:57 martin else posted:
I get this message on my program. I have an autos program , what I do is I select saloons then in comes up with a list ( 1 to 10 of 16 ) . I select next to go on to the next page to view the next pages listings and this message comes up. Can anyone help me. I will post the area around line 331 and on the bottom of the page I will past the whole page , just incase it helps anyone understand it because I don't understand it at all. Thanks a lot

ADODB.Field error '800a0bcd'

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

/Types.asp, line 331


THIS IS THE AREA AROUND LINE 331.

rsType_numRows = 0
%><!--#include file="inc_header.asp" -->

<!--#include file="inc_nav.asp" -->
<a href="default.asp" class="menu">Home</a> » <span class="box2"><a href="#" class="menu"><strong><%=(rsType.Fields.Item("TYPE_NAME".Value)%></strong></a>
</span>
<div align="right"> </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" height="0" valign="top"> <table width="97%" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" >
<tr>
<td height="524" valign="top" >
<% If rsSearch.EOF And rsSearch.BOF Then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>NO
RECORDS FOUND ! </strong></font></div></td>
</tr>
</table>
<% End If ' end rsSearch.EOF And rsSearch.BOF %>
<% If Not rsSearch.EOF Or Not rsSearch.BOF Then %>
<form action="compareAuto.asp" method="post" name="phCh" id="phCh">
<font color="#003300"> </font>
<table width="100%" border="0" align="center" cellpadding="2"


THIS IS THE WHOLE PAGE. Thanks again

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Server.ScriptTimeout = 360 %>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL") & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow") = "1" Then
Session.Abandon
MM_logoutRedirectPage = "default.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "" Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL")
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "" Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow" Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<!--#include file="Connections/conn.asp" -->
<%
Dim rsSearch__varTYPE
rsSearch__varTYPE = "%"
If (Request.QueryString("TYPE_ID" <> "" Then
rsSearch__varTYPE = Request.QueryString("TYPE_ID"
End If
%>
<%
set rsSearch = Server.CreateObject("ADODB.Recordset"
rsSearch.ActiveConnection = MM_conn_STRING
rsSearch.Source = "SELECT * From AutoAds,AD_IMAGES,autoSUBS,autoCATS WHERE AD_APPROVED = 1 AND TYPE_id LIKE('" + Replace(rsSearch__varTYPE, "'", "''" + "') And autoAds.AD_ID=AD_IMAGES.AD_ID AND autoCATS.CAT_ID like autoAds.CAT_ID AND autoSUBS.SUB_ID like autoAds.SUB_ID AND AD_EXPIRED > DATE() ORDER BY AD_DATED desc"
rsSearch.CursorType = 0
rsSearch.CursorLocation = 2
rsSearch.LockType = 3
rsSearch.Open()
rsSearch_numRows = 0
%>


<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 10
Repeat1__index = 0
rsSearch_numRows = rsSearch_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim rsSearch_total
Dim rsSearch_first
Dim rsSearch_last

' set the record count
rsSearch_total = rsSearch.RecordCount

' set the number of rows displayed on this page
If (rsSearch_numRows < 0) Then
rsSearch_numRows = rsSearch_total
Elseif (rsSearch_numRows = 0) Then
rsSearch_numRows = 1
End If

' set the first and last displayed record
rsSearch_first = 1
rsSearch_last = rsSearch_first + rsSearch_numRows - 1

' if we have the correct record count, check the other stats
If (rsSearch_total <> -1) Then
If (rsSearch_first > rsSearch_total) Then
rsSearch_first = rsSearch_total
End If
If (rsSearch_last > rsSearch_total) Then
rsSearch_last = rsSearch_total
End If
If (rsSearch_numRows > rsSearch_total) Then
rsSearch_numRows = rsSearch_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (rsSearch_total = -1) Then

' count the total records by iterating through the recordset
rsSearch_total=0
While (Not rsSearch.EOF)
rsSearch_total = rsSearch_total + 1
rsSearch.MoveNext
Wend

' reset the cursor to the beginning
If (rsSearch.CursorType > 0) Then
rsSearch.MoveFirst
Else
rsSearch.Requery
End If

' set the number of rows displayed on this page
If (rsSearch_numRows < 0 Or rsSearch_numRows > rsSearch_total) Then
rsSearch_numRows = rsSearch_total
End If

' set the first and last displayed record
rsSearch_first = 1
rsSearch_last = rsSearch_first + rsSearch_numRows - 1

If (rsSearch_first > rsSearch_total) Then
rsSearch_first = rsSearch_total
End If
If (rsSearch_last > rsSearch_total) Then
rsSearch_last = rsSearch_total
End If

End If
%>


<%
' *** Move To Record and Go To Record: declare variables

Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined

Dim MM_param
Dim MM_index

Set MM_rs = rsSearch
MM_rsCount = rsSearch_total
MM_size = rsSearch_numRows
MM_uniqueCol = "AD_ID"
MM_paramName = "id"
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "" Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> ""
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter

if (Not MM_paramIsDefined And MM_rsCount <> 0) then

' use index parameter if defined, otherwise use offset parameter
MM_param = Request.QueryString("index"
If (MM_param = "" Then
MM_param = Request.QueryString("offset"
End If
If (MM_param <> "" Then
MM_offset = Int(MM_param)
End If

' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If

' move the cursor to the selected record
MM_index = 0
While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
If (MM_rs.EOF) Then
MM_offset = MM_index ' set MM_offset to the last possible record
End If

End If
%>

<%
' *** Move To Record: if we dont know the record count, check the display range

If (MM_rsCount = -1) Then

' walk to the end of the display range for this page
MM_index = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend

' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = MM_index
If (MM_size < 0 Or MM_size > MM_rsCount) Then
MM_size = MM_rsCount
End If
End If

' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If

' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If

' move the cursor to the selected record
MM_index = 0
While (Not MM_rs.EOF And MM_index < MM_offset)
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats

' set the first and last displayed record
rsSearch_first = MM_offset + 1
rsSearch_last = MM_offset + MM_size

If (MM_rsCount <> -1) Then
If (rsSearch_first > MM_rsCount) Then
rsSearch_first = MM_rsCount
End If
If (rsSearch_last > MM_rsCount) Then
rsSearch_last = MM_rsCount
End If
End If

' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>

<%
' *** Move To Record: set the strings for the first, last, next, and previous links

Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev

Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "" Then
MM_paramList = Split(MM_keepMove, "&"
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=" - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "" Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If

' set the strings for the move to links
If (MM_keepMove <> "" Then
MM_keepMove = MM_keepMove & "&"
End If

MM_urlStr = Request.ServerVariables("URL" & "?" & MM_keepMove & MM_moveParam & "="

MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>

<%
Dim rsType__MMColParam
rsType__MMColParam = "1"
If (Request.QueryString("TYPE_ID" <> "" Then
rsType__MMColParam = Request.QueryString("TYPE_ID"
End If
%>
<%
Dim rsType
Dim rsType_numRows

Set rsType = Server.CreateObject("ADODB.Recordset"
rsType.ActiveConnection = MM_conn_STRING
rsType.Source = "SELECT TYPE_ID, TYPE_NAME FROM TYPES WHERE TYPE_ID = " + Replace(rsType__MMColParam, "'", "''" + ""
rsType.CursorType = 0
rsType.CursorLocation = 2
rsType.LockType = 1
rsType.Open()

rsType_numRows = 0
%><!--#include file="inc_header.asp" -->

<!--#include file="inc_nav.asp" -->
<a href="default.asp" class="menu">Home</a> » <span class="box2"><a href="#" class="menu"><strong><%=(rsType.Fields.Item("TYPE_NAME".Value)%></strong></a>
</span>
<div align="right"> </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" height="0" valign="top"> <table width="97%" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" >
<tr>
<td height="524" valign="top" >
<% If rsSearch.EOF And rsSearch.BOF Then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>NO
RECORDS FOUND ! </strong></font></div></td>
</tr>
</table>
<% End If ' end rsSearch.EOF And rsSearch.BOF %>
<% If Not rsSearch.EOF Or Not rsSearch.BOF Then %>
<form action="compareAuto.asp" method="post" name="phCh" id="phCh">
<font color="#003300"> </font>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" >
<tr valign="middle" >
<td width="30%" height="20" colspan="2" align="center" > 
<font color="#006699"><strong>
<table border="0" width="100%" align="center">
<tr>
<td width="10%" align="center"> <strong><font color="#006699">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_moveFirst%>" class="link1"><<First</a>
<% End If ' end MM_offset <> 0 %>
</font></strong></td>
<td width="8%" align="center"> <strong><font color="#006699">
<% If MM_offset <> 0 Then %>
<a href="<%=MM_movePrev%>" class="link1"><Previous</a>
<% End If ' end MM_offset <> 0 %>
</font></strong></td>
<td width="69%" align="center"><div align="center" class="menu"><strong>Viewing:
[<%=(rsSearch_first)%> to <%=(rsSearch_last)%>
of <%=(rsSearch_total)%>]</strong></div></td>
<td width="6%" align="center"> <strong><font color="#006699">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveNext%>" class="link1">Next></a>
<% End If ' end Not MM_atTotal %>
</font></strong></td>
<td width="7%" align="center"> <strong><font color="#006699">
<% If Not MM_atTotal Then %>
<a href="<%=MM_moveLast%>" class="link1">Last>></a>
<% End If ' end Not MM_atTotal %>
</font></strong></td>
</tr>
</table>
</strong></font></td>
</tr>
<tr valign="middle" >
<td height="20" colspan="2" align="center"><div align="right"><strong><font color="#333333" size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input name=compare type=button class="Buttons" onClick="if (Validate(this.form)) {submit();}" value=Compare>
<input name=clear type=reset class="Buttons" value=Clear>
</font></strong> </div></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsSearch.EOF))
%>
<tr align="center" valign="middle" bgcolor="#E1E1E1">
<td height="20" colspan="2" background="img/bkgTitle.gif" class="title3"><div align="left" class="title"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><font color="#FFFFFF" size="2"><a href="carDetail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "AD_ID=" & rsSearch.Fields.Item("AD_ID".Value %>" class="title2" ><strong><%=(rsSearch.Fields.Item("AD_TITLE".Value)%></strong></a></font></font></font></div>
<div align="right"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font size="2"></font></strong></font><font size="2"></font></strong></font></div></td>
</tr>
<tr align="center" valign="middle" >
<td height="137" align="left" valign="top" > <div class = "links">
<table width="95%" height="100" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="8" align="center" valign="top"><font color="#003300">
<input name="adID" type="checkbox" id="adID2" value="<%=(rsSearch.Fields.Item("AD_ID".Value)%>">
</font></td>
<td width="180" align="center" valign="middle">
<p align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><span class="title3"><strong><%=(rsSearch.Fields.Item("YEAR".Value)%>, 
<%=(rsSearch.Fields.Item("CAT_NAME".Value)%>
- <%=(rsSearch.Fields.Item("SUB_NAME".Value)%>
</strong></span><br>
<span class="content2"><%=(rsSearch.Fields.Item("EDITION".Value)%>
Edition - </span></font><span class="content2"><font face="Verdana, Arial, Helvetica, sans-serif"><%=Cur%><%=FormatNumber((rsSearch.Fields.Item("AD_PRICE".Value),2)%><br>
</font><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">
<% =(CropSentence((rsSearch.Fields.Item("AD_DESCRIPTION".Value), 150, "...") %>
</font></span></p>
<p align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="carDetail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "AD_ID=" & rsSearch.Fields.Item("AD_ID".Value %>" class="link1"><strong><img src="img/point3.gif" width="11" height="13" border="0"><span class="link1">more...</span></strong></a><br>
</font></p>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"> 
</font></td>
</tr>
</table>
</div></td>
<td valign="top" ><div align="right">
<p align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<%if rsSearch.Fields.Item("IMAGE1".Value = "" Then %>
<a href="carDetail.asp?make_id=<%=(rsSearch.Fields.Item("CAT_ID".Value)%>&model_id=<%=(rsSearch.Fields.Item("SUB_ID".Value)%>&ad_id=<%=(rsSearch.Fields.Item("AD_ID".Value)%>"><img src="images/nopic.jpg" width="150" height="100" border="0"></a>
<%else%>
<a href="carDetail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "AD_ID=" & rsSearch.Fields.Item("AD_ID".Value %>"><img src="images/<%=(rsSearch.Fields.Item("IMAGE1".Value)%>" width="140" height="105" border="0"></a>
<%end if %>
</font><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">
</font></p>
</div></td>
</tr>
<tr align="center" valign="middle" >
<td colspan="2" align="left" valign="top" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="img/helpers/line_bkg.gif"><img src="img/helpers/spacer.gif" width="10" height="1"></td>
</tr>
</table></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsSearch.MoveNext()
Wend
%>
</table>
</form>
<% End If ' end Not rsSearch.EOF Or NOT rsSearch.BOF %>
<p> </p></td>
</tr>
</table></td>
</tr>
<tr valign="top">
<td> </td>
</tr>
</table></td>
<td width="15" valign="top">
<!--#include file="inc_side.asp" -->

</table>
<!--#include file="inc_footer.asp" -->
<%
rsType.Close()
Set rsType = Nothing
%>
<%
rsSearch.Close()
%>

www.sell2make.com

Replies

Replied 17 May 2006 00:15:22
17 May 2006 00:15:22 micah santos replied:
I guess your database is empty that's why you're getting this error. Try to append records first then let's see if it does show this error again.

Reply to this topic