Travo
01-06-2005, 01:08 PM
Hello, Im pretty new to asp but i know c++ and html. Ive got a freeware forum which i want to use for my website and intergrated more of it into the existing website but i cannot get one part to work. I want the forum to use the usernames and id#s of an existing table in the database but its giving me an error. It works prefectly with Mozilla Firefox Browser but in IE it gives me the following error
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/OTCG/forums/Index.asp, line 103
ive tried everything i can think of to fix it but have gotten nowhere, its probably a quick fix but im too new to figure it out.
here is the code if itll fit
<%
s = request.querystring("s")
if len(s)<1 then s = 0
s=s*10
set db = Server.CreateObject("ADODB.Connection")
connect="Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath("../fpdb/pkf920.mdb")
db.Open connect
%>
<%
sql = "select title, autor, views, replies, id3, datum_updated, id2 from zForum1 where connected = 0 order by updated desc"
set rs = db.Execute(sql)
while not rs.eof
count = count +1
if count>s and count<=(s+10) then
if count mod 2 = 0 then
bgcolor = "#EFEFDE"
else
bgcolor = "#E3E1E1"
end if
%>
<tr>
<td width="50%" bgcolor="<%=bgcolor%>" align="left"><a class="text" href="forums/view.asp?id2=<%=rs("id2")%>&s=<%=s/10%>"><%=rs("title")%></a></td>
<td width="15%" bgcolor="<%=bgcolor%>" align="center"><a class="text" href="javascript:openWindow('scripts/tcards.asp?ID=<%=rs("ID3")%>')"><%=rs("autor")%></a>
</td>
<td width="10%" bgcolor="<%=bgcolor%>" align="center"><%=rs("views")%></td>
<td width="10%" bgcolor="<%=bgcolor%>" align="center"><%=rs("replies")%></td>
<td width="15%" bgcolor="<%=bgcolor%>" align="center"><%=rs("datum_updated")%></td>
</tr>
<%
end if
rs.movenext
wend
sql = "select count(id2) as alleEintraege from zForum1 where connected = 0"
set rs = db.Execute(sql)
alleEintraege = int(rs("alleEintraege"))
%>
<tr>
<td width="100%" bgcolor="#EFEFDE" colspan = "5" class = "text">
<p align="right">Page
<%for t = 0 to fix((alleEintraege-1)/10)%>
<a class = "text" href="index.asp?s=<%=t%>"><%if t=(s/10) then%><b><%end if%><%=t+1%><%if t=(s/10) then%></b><%end if%></a>
<%next%>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
rs.close
set rs = nothing
%>
<%
sql = "select * from Users" _
& " where Username = '" & Session("FootballPoolUsername") & "'"
set rsUsers = Db.Execute(sql)
dim userid, userne, rsUsers
userid = rsUsers("id")
userne = rsUsers("username")
%>
<br>
<form method="POST" action="forums/new.asp">
<input type="hidden" value='<% = userne %>' name="autor">
<input type="hidden" value='<% = userid %>' name="id3">
<table border="0" cellpadding="0" cellspacing="0" width="100" bgcolor="#000000" align="center">
<tr>
<td width="100%">
<table border="0" cellpadding="2" cellspacing="1" width="320" class="text">
<tr>
<td width="389" bgcolor="#848CB5" align="center" colspan="2"><b>NEW POSTING</b></td>
</tr>
<tr>
<td width="70" bgcolor="#EFEFDE" align="left">Title</td>
<td width="319" bgcolor="#EFEFDE" align="left">
<input type="text" name="title" size="34" maxlength="40"></td>
</tr>
<tr>
<td width="394" bgcolor="#EFEFDE" colspan="2" align="left">
<textarea rows="6" name="message" cols="39"></textarea></td>
</tr>
<tr>
<td width="394" bgcolor="#EFEFDE" colspan="2" align="center">
<input type="submit" value="save" name="B1"></td>
</tr>
</table>
</td>
</tr>
<%
db.close
set db = nothing
rsUsers.close
set rsUsers = nothing
%>
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/OTCG/forums/Index.asp, line 103
ive tried everything i can think of to fix it but have gotten nowhere, its probably a quick fix but im too new to figure it out.
here is the code if itll fit
<%
s = request.querystring("s")
if len(s)<1 then s = 0
s=s*10
set db = Server.CreateObject("ADODB.Connection")
connect="Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath("../fpdb/pkf920.mdb")
db.Open connect
%>
<%
sql = "select title, autor, views, replies, id3, datum_updated, id2 from zForum1 where connected = 0 order by updated desc"
set rs = db.Execute(sql)
while not rs.eof
count = count +1
if count>s and count<=(s+10) then
if count mod 2 = 0 then
bgcolor = "#EFEFDE"
else
bgcolor = "#E3E1E1"
end if
%>
<tr>
<td width="50%" bgcolor="<%=bgcolor%>" align="left"><a class="text" href="forums/view.asp?id2=<%=rs("id2")%>&s=<%=s/10%>"><%=rs("title")%></a></td>
<td width="15%" bgcolor="<%=bgcolor%>" align="center"><a class="text" href="javascript:openWindow('scripts/tcards.asp?ID=<%=rs("ID3")%>')"><%=rs("autor")%></a>
</td>
<td width="10%" bgcolor="<%=bgcolor%>" align="center"><%=rs("views")%></td>
<td width="10%" bgcolor="<%=bgcolor%>" align="center"><%=rs("replies")%></td>
<td width="15%" bgcolor="<%=bgcolor%>" align="center"><%=rs("datum_updated")%></td>
</tr>
<%
end if
rs.movenext
wend
sql = "select count(id2) as alleEintraege from zForum1 where connected = 0"
set rs = db.Execute(sql)
alleEintraege = int(rs("alleEintraege"))
%>
<tr>
<td width="100%" bgcolor="#EFEFDE" colspan = "5" class = "text">
<p align="right">Page
<%for t = 0 to fix((alleEintraege-1)/10)%>
<a class = "text" href="index.asp?s=<%=t%>"><%if t=(s/10) then%><b><%end if%><%=t+1%><%if t=(s/10) then%></b><%end if%></a>
<%next%>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
rs.close
set rs = nothing
%>
<%
sql = "select * from Users" _
& " where Username = '" & Session("FootballPoolUsername") & "'"
set rsUsers = Db.Execute(sql)
dim userid, userne, rsUsers
userid = rsUsers("id")
userne = rsUsers("username")
%>
<br>
<form method="POST" action="forums/new.asp">
<input type="hidden" value='<% = userne %>' name="autor">
<input type="hidden" value='<% = userid %>' name="id3">
<table border="0" cellpadding="0" cellspacing="0" width="100" bgcolor="#000000" align="center">
<tr>
<td width="100%">
<table border="0" cellpadding="2" cellspacing="1" width="320" class="text">
<tr>
<td width="389" bgcolor="#848CB5" align="center" colspan="2"><b>NEW POSTING</b></td>
</tr>
<tr>
<td width="70" bgcolor="#EFEFDE" align="left">Title</td>
<td width="319" bgcolor="#EFEFDE" align="left">
<input type="text" name="title" size="34" maxlength="40"></td>
</tr>
<tr>
<td width="394" bgcolor="#EFEFDE" colspan="2" align="left">
<textarea rows="6" name="message" cols="39"></textarea></td>
</tr>
<tr>
<td width="394" bgcolor="#EFEFDE" colspan="2" align="center">
<input type="submit" value="save" name="B1"></td>
</tr>
</table>
</td>
</tr>
<%
db.close
set db = nothing
rsUsers.close
set rsUsers = nothing
%>