Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help

 Post Reply Post Reply Page  <12
Author
donnytree View Drop Down
Newbie
Newbie


Joined: 04 October 2002
Location: United Kingdom
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote donnytree Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2003 at 5:21pm
Think I've nearly solved it now :D
Back to Top
donnytree View Drop Down
Newbie
Newbie


Joined: 04 October 2002
Location: United Kingdom
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote donnytree Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 5:30am

A short problem on the next page now (http://www.te.fragworld.co.uk/teams/view_team.asp?Id_No=1 now hosted there.)

ADODB.Field error '80020009'

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

/teams/view_team.asp, line 0

What the hell??

Here is the code, can someone see something I can't

<html>
<head>
<title>Viewing Team Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
Dim adoCon          'Holds the Database Connection Object
Dim rsTeam    'Holds the recordset for the records in the database
Dim strSQL           'Holds the SQL query for the database
Dim lngRecordNo    'Holds the record number to be updated

'Read in the record number to be viewed
lngRecordNo = CLng(Request.QueryString("ID"))

'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")

'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("team.mdb")

'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=team"

'Create an ADO recordset object
Set rsTeam = Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT Team.* FROM Team WHERE Id_No=" & lngRecordNo

'Open the recordset with the SQL query
 rsTeam.Open strSQL, adoCon

Response.Write("<table width='80%' border='0' cellpadding='0' cellspacing='0'>")
 Response.Write("<tr> ")
  Response.Write("<td width='150'height='150' valign='top'>")
  Response.Write("<img src='<rsTeam('Badge')>'>")
  Response.Write("</td>")
  Response.Write("<td width='449' valign='top'>")
  Response.Write("Club Name:")
  Response.Write(rsTeam("Team"))
  Response.Write("<br>")
  Response.Write("Ground:")
  Response.Write(rsTeam("Ground"))
  Response.Write("<br>")
  Response.Write("Coach:")
  Response.Write(rsTeam("Coach"))
  Response.Write("<br>")
  Response.Write("Captain:")
  Response.Write(rsTeam("Captain"))
  Response.Write("<br>")
  Response.Write("Current Division:")
  Response.Write(rsTeam("League"))
  Response.Write("<br>")
  Response.Write("Last Game vs Dragons:")
  Response.Write(rsTeam("Last_Match_Doncaster"))
  Response.Write("Last Match vs Dragons (Result):")
  Response.Write(rsTeam("Last_Match_Result"))
  Response.Write("</td>")
  Response.Write("</tr>")
  Response.Write("<tr>")
    Response.Write("<td height='167' valign='top' colspan='2'>")
 Response.Write("Club Information:")
 Response.Write(rsTeam("Info"))
Response.Write("</td>")
  Response.Write("</tr>")
Response.Write("</table>")
'Reset server objects
rsTeam.Close
Set rsTeam = Nothing
Set adoCon = Nothing
%>
</body>

</html>

Help (Again)


Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 5:37am

The error means exactly what it says!

You are tyring to reference values from a recordset, except that the recordset is empty OR you are at the end of the recordset.

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
donnytree View Drop Down
Newbie
Newbie


Joined: 04 October 2002
Location: United Kingdom
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote donnytree Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 5:47am

Sorry for sounding thick, its just I've got a stinking cold, headaches,and earaches.

How can I solve it?

Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 6:04am
Work out why there aren't any records in your recodset
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
donnytree View Drop Down
Newbie
Newbie


Joined: 04 October 2002
Location: United Kingdom
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote donnytree Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 7:16am

Sorted it was this

lngRecordNo = CLng(Request.QueryString("ID"))

Should have been

lngRecordNo = CLng(Request.QueryString("Id_No"))

this

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 8:07am
Originally posted by donnytree donnytree wrote:

Sorted it was this


<FONT color=#0000ff size=1>lngRecordNo = CLng(Request.QueryString("ID"))


<FONT color=black size=2>Should have been


<FONT color=#0000ff size=1>lngRecordNo = CLng(Request.QueryString("Id_No"))


<FONT color=black size=2>this


and with that code.. notice that just the link "http://www.te.fragworld.co.uk/teams/view_team.asp" crashes the page...

you need to make sure that there was an ID passed in
Contribute to the working anarchy we fondly call the Internet
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 8:09am
and while that brings back the "no records found error", you need to simple check after doing the query if "rsTeam.EOF" as said about 10 replies ago...

not only that...
http://www.te.fragworld.co.uk/teams/view_team.asp?Id_No= flat out makes the whole page crash
Contribute to the working anarchy we fondly call the Internet
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.