Hi guyz... I'm back with another problem.... I'm using the codes to display all record from a table...
<%
Dim cn
Dim rs
Dim sqlstring
Dim theSubject
Dim theContent
Dim theCategory
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
dataConn= "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("cd2buy.mdb")
cn.open dataConn
sqlstring = "SELECT * FROM FORUM WHERE (((FORUM.Forum_ID)="& Request("threadid") &")) OR (((FORUM.Parent)='"& Request("threadid") &"'))"
rs.Open sqlstring,cn
if rs.BOF = True And rs.EOF = True Then
Response.Write ("Thread Not Found !!!! ")
else
do until rs.EOF
theCategory = rs("Category")
theSubject= rs("Subject")
theContent = rs("Content")
Response.Write("Subject is :" & theSubject)
Response.Write("<tr><font size=" & chr(34) & "4" & chr(34) &" face="& chr(34) & "Arial, Helvetica, sans-serif"& chr(34) & "><strong>" & rs("Category") & "</strong></font><br><br></tr> ")
Response.Write("<tr> <td width= "& chr(34) & "125" & chr(34) & " rowspan=" & chr(34) & "2" & chr(34) & " align="& chr(34) & "center"& chr(34) &" valign="& chr(34) & "middle"& chr(34) & " bgcolor=" & chr(34) & "#9999FF" & chr(34) & "> <font color="& chr(34) & "#FFFFFF" & chr(34) & " size="& chr(34) & "2"& chr(34) &" face="& chr(34) & "Arial, Helvetica, sans-serif"& chr(34) & "><strong>by : " & rs("UserName") & "</strong></font><font size="& chr(34) & "2"& chr(34) &" face="& chr(34) &"Arial, Helvetica, sans-serif"& chr(34) & "><br><br><font color="& chr(34) & "#FFFFFF"& chr(34) &"><strong>Date:</strong> " & rs("Date") & "</font><br><font color="& chr(34) & "#FFFFFF" & chr(34) & "><strong>Time:</strong> " & rs("Time") & "</font></font></td><td width="& chr(34) & "559"& chr(34) & " height="& chr(34) & "39"& chr(34) & "><font color="& chr(34) & "#CCCC33" & chr(34) & "><strong><em><u>Subject : " & theSubject & "</strong></font></u></em></td></tr><tr><td bgcolor=" & chr(34) & "#CCCCFF" & chr(34) & "><font size="& chr(34) & "2" & chr(34) & " face=" & chr(34) & "Geneva, Arial, Helvetica, sans-serif"& chr(34) & ">" & theContent & "</font></td></tr>")
Response.Write("This is the subject :" & rs("Forum_ID"))
rs.Movenext
loop
end if
%>
but it gives me an 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.
/cd2buy/viewthread.asp
any idea to solve the problem.....?...
Thank you...
cawi17