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)