Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2006, 04:36 PM
Authorized User
 
Join Date: May 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need some help ErrorType: ADODB.Field (0x80020009)

Need some help here with this error....

Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/excel_registrashon/display_xrec_page.asp


This page should display 10 records per page out of the db. When the records are excactly 10, 20, 30, 40, 50, 60 etc, the pages displays without this error. If the records in the database is e.g. 12, 13, 33, 41, 57 etc this error comes.

What code is missing???

<%
'Link to database
dim rsHotspots,i,strConn,strTemp
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("_incl/registrashon.mdb")
'select data
Set rsHotspots = Server.CreateObject("ADODB.Recordset")
'choose available data
strSQL = "SELECT * FROM miembro;"

rsHotspots.CursorLocation=3 'clientside
rsHotspots.CursorType=3 'staticrecordset
rsHotspots.PageSize=10

'open recordset
rsHotspots.Open strSQL, adoCon

if Request.QueryString("pg")="" then
rsHotspots.AbsolutePage=1
else
rsHotspots.AbsolutePage=Request.QueryString("pg")
end if

For i=1 to 10
Response.Write "<table>"
response.write "<tr><td width= ""150"">"
Response.Write rsHotspots.Fields("nomber")
response.write "</td><td width= ""150"">"
Response.Write rsHotspots.Fields("fam")
response.write "</td><td width= ""150"">"
Response.Write rsHotspots.Fields("sekso")
response.write "<tr><td colspan=""3"" bgcolor=""#159FF6"" height=""3""></td></tr>"
Response.Write "</table>"
rsHotspots.MoveNext

response.write "</td></tr>"
Next

Response.Write "<p><table><tr>"
for i=1 to rsHotspots.PageCount
Response.Write "<td><a href='display_xrec_page.asp?pg=" & i & "'>" & i & "</a></td>"
next
Response.Write "</tr></table>"
%>



__________________
-------------------------
peace, luv and respect





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Field (0x80020009) susman SQL Server ASP 0 November 2nd, 2007 03:04 AM
ADODB.Field error '800a0bcd' - FIXED buddyz Classic ASP Databases 2 October 9th, 2006 05:52 PM
ADODB.Field error '80020009' EricTheViking Access ASP 2 August 16th, 2005 12:45 AM
DotNet conversion for ADODB.Field in VB seby General .NET 0 December 1st, 2004 08:11 AM
sole the error 0x80020009 Prabhakar_dt Classic ASP Basics 3 September 10th, 2004 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.