Mine data vises ikke!
Stort og urgent problem. Derfor de mange points Jeg har et debatforum der er bygget op omkring en access database. Der er 11 kategorier og der lå 72 spørgsmål inde i debatten. pludselig uden grund forsvinder alle indlæggene??se forsiden: http://www.forskningsforum.dk/parrotdata/forum/
de 72 indlæg ligger stadig i databsen men vises ikke - kun kategorioverskrifterne vises? Men hvis der søges på et bogstav kan de indlæg der indeholder dette bogstav vises? Hvad kan der være galt?
Kan det have noget med cookie at gøre?
Jeg tillader mig at vedhæfte scriptet:
<!--#INCLUDE FILE=\"config.inc\" -->
<%
set my_conn= Server.CreateObject(\"ADODB.Connection\")
my_Conn.Open ConnString
\'## Get Totals
set rs1 = Server.CreateObject(\"ADODB.Recordset\")
strSQL = \"Select * from Totals\"
rs1.open strSQL, my_conn
Users = rs1(\"U_Count\")
Posts = rs1(\"P_Count\")
rs1.Close
set rs1 = nothing
\'## Get all Forums From DB
strSql = \"SELECT * FROM Category\"
set rs = my_conn.Execute (StrSql)
\'## Do some Cookie bits to see when last here
session(\"last_here_date\") = Request.Cookies(\"date\")
Response.Cookies(\"Date\") = now()
Response.Cookies(\"Date\").Expires = dateadd(\"d\",365,now())
\' if never been here before, set last_here_date to -10 days
if Session(\"last_here_date\") = \"\" then
Session(\"last_here_date\") = dateadd(\"d\",-10,now())
End if
\'## Function to display new icon
Function isNew(dt)
if datediff(\"s\", session(\"last_here_date\"), dt) > 1000 then
isNew = \"<font face=\'\" & DefaultFontFace & \"\' color=\'\" & NewFontColor & \"\' size=\'1\'> \"
Else
isNew = \" \"
End If
End Function
%>
<%
bDontCount = false
sPageTitle = \"[ ..PARROTDATA.. ]\"
bAdminOnly = False
lSubjectID = 0
sTitleBar = \"You are here >> <a href=\"\"/parrotdata/index.asp\"\">home</a> >> Discussion Center\"%>
<!--#include virtual=\"/parrotdata/_header.asp\"-->
<head>
<title></title>
</head>
<body topmargin=\"0\" leftmargin=\"0\">
<br>
<!--#INCLUDE FILE=\"top.inc\" -->
<div align=\"center\">
<center>
<table width=\"92%\" border =0><tr><td width=\"47%\"><font face=\"<% =DefaultFontFace %>\" size=\"1\">
You last Visited - <%= session(\"last_here_date\")%>
</font>
</td><td align=right width=\"53%\"><font face=\"<% =DefaultFontFace %>\" size=\"1\">Total Posts : <%= Posts %> </font></td></tr>
</table>
</center>
</div>
<div align=\"center\"><center>
<div align=\"center\">
<center>
<table border=\"0\" width=\"100%\" cellspacing=\"1\">
<tr>
<td align=\"center\" bgcolor=\"<% =HeadCellColor %>\" width=\"4%\"><strong> </td>
<td align=\"center\" bgcolor=\"<% =HeadCellColor %>\" width=\"42%\"><strong>
<font face=\"<% =DefaultFontFace %>\" size=\"1\" color=\"<% =HeadFontColor %>\">FORUM</font></strong></td>
<td align=\"center\" bgcolor=\"<% =HeadCellColor %>\" width=\"8%\"><strong>
<font face=\"<% =DefaultFontFace %>\" size=\"1\" color=\"<% =HeadFontColor %>\">POSTS</font></strong></td>
<td align=\"center\" bgcolor=\"<% =HeadCellColor %>\" width=\"31%\"><strong>
<font face=\"<% =DefaultFontFace %>\" size=\"1\" color=\"<% =HeadFontColor %>\">LAST POST</font></strong></td>
<td align=\"center\" bgcolor=\"<% =HeadCellColor %>\" width=\"24%\"><strong>
<font face=\"<% =DefaultFontFace %>\" size=\"1\" color=\"<% =HeadFontColor %>\"></font></strong></td>
</tr>
<%
If rs.Eof or rs.Bof then \' No categories found in DB
Response.Write \"<tr><td collspan=5>No Forums Found</td></tr>\"
Else
do until rs.eof \'## Grab the Categories.
\'## Display Category
Response.Write \"<tr><td colspan=5 bgcolor=\'\" & CategoryCellColor & \"\'><font face=\'\" & DefaultFontFace & \"\' size=\'1\' color=\'\" & CategoryFontColor & \"\' size+1> <strong>\"& rs(\"cat_name\") & \" </strong></font></td></tr>\"
\'## Build SQL to get forums via category
strSql = \"SELECT Forum.Forum_ID, Forum.F_Name, Forum.F_Description, Forum.F_Cat, Forum.F_Count, Forum.F_Last_Post, Forum.F_Moderator, Users.UserName \"
strSql = strSql & \"FROM Users INNER JOIN Forum ON Users.BrugerID = Forum.F_Moderator \"
strSql = strSql & \"where Forum.F_Cat = \" & rs(\"cat_id\")
set rsForum = my_conn.Execute (StrSql)
if rsForum.eof or rsForum.bof then
Response.Write \"<tr><td collspan=5> </td></tr>\"
else
do until rsForum.Eof \'## Display Forum
Response.Write \"<tr>\" & vbcrlf
Response.Write \"<td bgcolor=\'\" & ForumCellColor & \"\'>\" & isNew(rsForum(\"F_Last_Post\")) & \"</td>\"& vbcrlf
Response.Write \"<td bgcolor=\'\" & ForumCellColor & \"\'><font face=\'\" & DefaultFontFace & \"\' size=1><a href=\'forum.asp?forum_id=\" & rsForum(\"Forum_ID\") & \"&forum_title=\" & server.URLEncode(rsForum(\"F_name\")) & \"\'>\"
Response.Write rsForum(\"F_name\") & \"</a><br>\" & vbcrlf
Response.Write \"<td bgcolor=\'\" & ForumCellColor & \"\' align=\'center\' valign=\'top\' ><font face=\'\" & DefaultFontFace & \"\' color=\'\" & ForumFontColor & \"\' size=\'1\'>\" & rsForum(\"F_Count\") & \"</font></td>\" & vbcrlf
Response.Write \"<td bgcolor=\'\" & ForumCellColor & \"\' align=\'center\' valign=\'top\'><font face=\'\" & DefaultFontFace & \"\' color=\'\" & ForumFontColor & \"\' size=\'1\'>\" & rsForum(\"F_Last_Post\") & \"</font></td>\" & vbcrlf
Response.Write \"</tr>\" & vbcrlf
rsForum.movenext
loop
End If
rs.MoveNext
loop
End If
%>
</table>
</center>
</div>
<p align=\"center\"> <font face=\"<% =DefaultFontFace %>\" size=\"1\"><a href=\"default.asp\">Show All Forums</a></p>
<%
my_conn.Close
set my_conn = nothing
set rs = nothing
set rsForum = nothing
%>
</div>
</font>
