Bøvl
Har sat og rodet lidt med noget kode som jeg fandt her på siden, men jeg kan ikke få det til af funke, er der nogen der kan hjælpe ?Det ser sådan ud !
<!-- #INCLUDE FILE="const/adovbs.inc" -->
<!-- #INCLUDE FILE="const/connect.asp" -->
<%
Dim SQL, countSQL, counter, maxCount, RS
Set Rs = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM waterfowler"
countSQL = "SELECT COUNT(*) AS tot FROM waterfowler"
maxCount = 3
Rs.open SQL, Conn, 3, 3
Set countRs = Conn.Execute( countSQL )
intTot = CInt( countRs("tot") )
countRs.close
Set countRs = nothing
if( maxCount > intTot ) then
maxCount = intTot
end if
Randomize
while maxCount >= 0
tmp = intTot * Rnd + 1
Set RS = Conn.Execute( SQL )
Rs.Move tmp
Response.Write "<a href='http://" & Record("http") & "'><img src='" & Record("banner") & "' alt='" & Record("info") & "' border = '0'></a>"
maxCount = maxCount - 1
wend
%>
Og den skriver følgende fejl.
Error Type:
ADODB.Recordset.1 (0x80020009)
Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record.
/ringsoft/rotate.asp, line 27