Gider du prøve at udskrive din sql...
Hvist nok noget med response.write $sql; eller sådan noget
MVH Jakob Nicolajsen
alias pcnoerd
www.pcnoerd.1go.dk/ | pcnoerd@hotmail.com | ICQ# 178307490
Du kan få hele koden
<pre>
<% Response.buffer = true
' Databaseforbindelse - husk at angive sti til din database
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("Forum.mdb")
Conn.Open DSN
mode = request("mode")
%>
<html>
<head>
<title>Forum</title>
</head>
<body>
<center><h3><a href=Forum.asp?mode=New_Ind>Nyt indlæg</a></h3></center>
<% if mode = "" then
sql="SELECT * FROM Indleg order by id DESC"
Set res=conn.Execute(sql)
fi_antal=0
do until res.eof
fi_antal=fi_antal+1
res.movenext
loop
res.movefirst
%>
<br>Der er nu: <%=fi_antal%> indlæg.</div><br>
<%
sql="SELECT * FROM Svar order by id DESC"
Set res=conn.Execute(sql)
fs_antal=0
do until res.eof
fs_antal=fs_antal+1
res.movenext
loop
res.movefirst
%>
<br>Der er nu: <%=fs_antal%> svar.</div><br>
<%
sql="SELECT * FROM Indleg order by id DESC"
Set res=conn.Execute(sql)
do until res.eof
%>
<%
strSQL = "Select * From Indleg Where Id = " & res("id")
Set res = Conn.Execute(strSQL)
%>
<%
fas_antal=0
do until res.eof
fas_antal=fas_antal+1
res.movenext
loop
res.movefirst
%>
<%=fas_antal%>
<%
res.movenext
loop
%>
<%
sql="SELECT * FROM Indleg order by id DESC"
Set res=conn.Execute(sql)
%>
<center><h3>Forum</h3></center>
<center><h3>Indlæg</h3></center>
<table border="2" align="center" cellpadding="0" cellspacing="0" width="800">
<tr><td>
<table border="2" align="center" cellpadding="0" cellspacing="0" width="800">
<tr>
<td width="300"><font color="000000">Overskrift:</font></td><td width="300"><font color="000000">Indlæg af:</font></td><td width="300"><font color="000000">Antal svar:</font></td><td width="300"><font color="000000">Tid:</font></td><td width="300"><font color="000000">Email:</font></td></tr>
</tr>
</TABLE>
</td></tr>
<tr><td>
<br>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="800">
<%
fas_antal=0
do until res.eof
fas_antal=fas_antal+1
res.movenext
loop
res.movefirst
do until res.eof
%>
<tr><td width="300"><a href=Forum.asp?mode=Show&id=<%=res("id")%>><%=res("Overskrift")%></a></td><td width="300"><%=res("Navn")%></td><td width="300"><%=fas_antal%></td><td width="300"><%=res("tid")%></td><td width="300"><a href=mailto:<%=res("E-Mail")%>><%=res("E-Mail")%></a></td></tr>
<%
res.movenext
loop
%>
</TABLE>
<br>
</TABLE>
<%
end if
if mode = "Show" then
strSQL = "Select * From Indleg Where Id = " & Request.Querystring("id")
Set res = Conn.Execute(strSQL)
%>
<center><h3>Forum</h3></center>
<center><h3><a href=Forum.asp>Til Forum Forsiden</a></h3></center>
<center><h3>Læs Indlæg</h3></center>
<table border="2" align="center" cellpadding="0" cellspacing="0" width="700">
<tr><td>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="700">
<tr><td>
<table border="1" align="center" bgcolor="#ffffff" width="700" cellpadding="0" cellspacing="0">
<tr><td width="200"><font color="000000">Overskrift:<%=res("Overskrift")%></font></td><td width="200"><font color="000000">Indlæg af:<%=res("Navn")%></font></td><td width="200"><font color="000000">Tid:<%=res("tid")%></font></td><td width="200"><font color="000000">Email:<a href=mailto:<%=res("E-Mail")%>><%=res("E-Mail")%></a></font></td></tr>
</table></td></tr>
<tr><td>
<br><center><%=res("Besked")%></center><br>
</td></tr>
</table>
<%
SQL = "Select * From Svar Where Id = '" & Request.Querystring("id") & "'"
Set res = Conn.Execute(SQL)
%>
<br>
<%
do until res.eof
%>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="700">
<tr><td>
<table border="1" align="center" bgcolor="#ffffff" width="700" cellpadding="0" cellspacing="0">
<tr><td width="200"><font color="000000">Svar Re:<%=res("Overskrift")%></font></td><td width="200"><font color="000000">Svar fra:<%=res("Navn")%></font></td><td width="200"><font color="000000">Tid:<%=res("tid")%></font></td><td width="200"><font color="000000">Email:<a href=mailto:<%=res("E-Mail")%>><%=res("E-Mail")%></a></font></td></tr>
</table></td></tr>
<tr><td>
<br><center><%=res("Besked")%></center><br>
</td></tr>
</table>
<%
res.movenext
loop
%>
</td></tr>
</table>
<% end if %>
<% if mode = "New_Ind" then %>
<center>
<form method="POST" action="forum.asp?mode=post_ind">
<p>Overskrift:<input type="text" size="20" name="Overskrift"></p>
<p>Navn:<input type="text" size="20" name="Navn"></p>
<p>Email<input type="text" size="20" name="email"></p>
<p>Besked<textarea name="besked" rows="2" cols="20"></textarea></p>
<p><input type="submit" name="Sup" value="Post"></p>
</form></center>
<%end if%>
<% if mode = "post_ind" then %>
<%
f_overskrift = Request.form("Overskrift")
f_email = Request.form("email")
f_navn = Request.form("Navn")
f_besked = Request.form("besked")
f_tid = now()
sql="Insert into Indleg (Overskrift, E-Mail, Navn, Besked, tid) VALUES ('" & f_overskrift & "','" & f_email & "','" & f_navn & "','" & f_besked & "','" & f_tid & "')"
conn.Execute(sql)
%>
<%end if%>
<%
' Luk databaseforbindelse
Conn.Close
Set Conn = Nothing
%>
</body>
</html> </pre>