Below are the codes for my .asp page.... It's kindda weird... I've tried to display multiple recordsets values usin rs("") on different places on a page... but it dispaly only 1 of the rs("")
The rs("Subject") field and rs("Content") field are Memo Data type....
As you can see, I'd tried to retrieve rs("Subject") on 2 location on the page... but when previewing, onyl 1 rs diplay the information. The other is empty... What's wrong with it?....
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="700" border="1" cellpadding="2" cellspacing="2">
<%
Dim cn
Dim rs
Dim sqlstring
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
'viewing forum by category
dataConn= "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("cd2buy.mdb")
cn.open dataConn
sqlstring = "SELECT FORUM.* FROM FORUM WHERE (((FORUM.Forum_ID)=" & Request("threadid") & "))"
rs.Open sqlstring, cn
Response.Write("Subject is :" & rs("Subject"))
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 : " & rs("Subject") & "</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) & ">" & rs("Content") & "</font></td></tr>")
Response.Write("This is the subject :" & rs("Forum_ID"))
' reply thread form
%>
</table>
<table width="500" border="0">
<tr>
<td bgcolor="#CCCCFF">
<br>
<font size="4" face="Arial, Helvetica, sans-serif"><strong>Reply
To Thread</strong></font>
<form action="processreply.asp" method="post" name="replyforum">
<table width="500" border="0">
<tr>
<td width="100"> <font size="2" face="Arial, Helvetica, sans-serif">Subject
: </font> </td>
<td width="574"><input name="theSubject" type="text" id="theSubject3" size="66" <% Response.Write(" value=" & chr(34) & rs("Subject")) & chr(34) %>>
</td>
</tr>
<tr>
<td> <font size="2" face="Arial, Helvetica, sans-serif">Category
:</font></td>
<td><input type="text" name="theCategory" <% Response.Write(" value=" & chr(34) & rs("Category")) & chr(34) %>></td>
</tr>
<tr>
<td> </td>
<td><% Response.Write("<textarea name="& chr(34) & "thecontent"& chr(34) &" cols=50 rows=10 >" & rs("Content")& "</textarea>")%></td>
</tr>
</table>
<p align="center">
<input type="submit" name="Submit" value="Reply Thread !">
<input type="reset" name="Submit2" value="Reset">
<input type="hidden" name="parentthread" value="1">
</p>
</form>
</td>
</tr>
</table>
</body>
</html>