Asp fejl.. æv
Jeg for denne fejl:ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/secret-test/index2.asp, line 38
Min kode:
<%
Randomize
bot_tal = (CInt(Rnd()*11))
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath ("../../db/ho_bruger.mdb")
Conn.Open DSN
strSQL = "Select * From cital Where Id = " & bot_tal
Set rs = Conn.Execute(strSQL)
cital = rs("cital")
af = rs("af")
rs.close
set rs = Nothing
Conn.Close
Set Conn = Nothing
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = "DBQ=" & server.mappath("../../db/ho_bruger.mdb")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & DBPath
Sql = "Select count(*) as Found from quto"
Set Rs = Conn.Execute(Sql)
Ialt = Rs("Found")
rs.close
set rs = nothing
Sql = "Select * from quto"
Set Rs = Conn.Execute(Sql)
Function Show()
Randomize
RandNum = Int(Rnd() * Ialt) + 1
Rs.MoveFirst
For i = 1 to RandNum - 1
Rs.MoveNext
next
Show = "<table><tr><td><b>Bog: " & Rs("book") & "<b></td></tr><tr><td>" & Rs("text") & "</td></tr></table>"
end function
Conn.close
set Conn = NOthing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>HO - Skifter til version 2</title>
</head>
<body bgcolor="#BEC7CE" text="#666666" link="#FF9900" vlink="#FF9900" alink="#FF9900">
<center>
HogwartsOnline.dk Under Opbygning<br>
<br><table><tr><td>
<img border="0" src="ho-logo.jpg" width="400" height="400"></td><td> </td><td width="150">
<%=show()%>
</td>
</tr></table>
<br><br><table width="400"><tr><tb><font size="1" face="verdina"><b>Cital:</b><br>"<%=cital%>"<br> - <%=af%><br><br>
</font></tb></tr></table>
<a href="chat">:: Chat med alle andre fra HO her ::</a><br>
<a href="intro.htm">:: NY intro til HO version 2.0 ::</a> <br>
<a href="nicolair_som_mus.htm">:: Nicolair som musse Rektor :: </a><br><br><br>
<!-- Chart Basis HTML kode start v003 -->
<script language="javascript" type="text/javascript">
<!--
document.write('<a href="http://www.chart.dk/ref.asp?ct=v003&id=62626" target="_blank">');
var myref; myref=document.referrer; if(top.document.referrer!=null) myref=top.document.referrer;
document.write('<img src="http://cluster.chart.dk/chart.asp?id=62626&style=7&secID=' + Math.random()*10000000 + '&ref=' + escape(myref) + '" border="0" alt="Chart.dk"><');
document.write('/a>');
//-->
</script>
<noscript> <a href="http://www.chart.dk/ref.asp?ct=v003&id=62626" target="_blank"><img src="http://cluster.chart.dk/chart.asp?id=62626&style=7&secID=1" border="0" alt="Chart.dk"></a>
</noscript>
<!-- Chart Basis HTML kode slut v003 -->
<a href="http://www.nope.dk/lb.php3?id=9936" target="_blank"><img border="0" src="http://counter.nope.dk/counter.php3?id=9936"></a>
</center>
</body>
</html>

