HJÆLP
hvad er der galt her fejlmeddelsen lyder sådanne :Fejltype:
(0x80020009)
Undtagelse opstod.
/spil/funktioner.asp, line 117
Function Display_shot(row,col,hit)
'Opret forbindelse til databasen
SQLserveradr="localhost"
SQLdatabase="Spil"
SQLlogin=""
SQLpassword=""
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "driver={MySql};server="& SQLserveradr &";database="& SQLdatabase &";uid="& SQLlogin &";pwd="& SQLpassword
strSQL = "Select * From navy Where id= 1"
Set rs = Conn.Execute(strSQL)
dim udstr
udstr = "<table border=1 class=plade>"
if hit = true then
for r= 0 to 19
udstr = udstr & "<tr>"
for d=0 to 19
if (((r = row) and (d = col)) or rs("hit") = 5) then
udstr = udstr & "<td width=""15"" class=plade_hit> </td>"
'indsæt værdierne til databsen
strSQL = "Update navy set hit = 5 where x='r' and y='d'"
'send informationen til databasen
Conn.Execute(strSQL)
else
if rs("hit") = 6 then
udstr = udstr & "<td width=""15"" class=plade_miss> </td>"
else
udstr = udstr & "<td width=""15"" class=plade_ledig><a Href=Default.asp?id=3&row="& r&"&"& "col=" & d &"&"&"> </a></td>"
end if
end if
if Not rs.EOF then
rs.movenext
else
end if
next
udstr = udstr & "</tr>"
next
else
for r = 0 to 19
udstr = udstr & "<tr>"
for d=0 to 19
***linie 117 **** if ((r = row) and (d = col)) or rs("hit") = 6 then
udstr = udstr & "<td width=""15"" class=plade_miss> </td>"
'indsæt værdierne til databsen
strSQL = "Update navy set hit = 6 where x='r' and y='d'"
'send informationen til databasen
Conn.Execute(strSQL)
else if rs("hit") = 5 then
udstr = udstr & "<td width=""15"" class=plade_hit> </td>"
else
udstr = udstr & "<td width=""15"" class=plade_ledig><a Href=Default.asp?id=3&row="& r&"&"& "col=" & d &"&"&"> </a></td>"
end if
end if
if Not rs.EOF then
rs.movenext
else
end if
next
udstr = udstr & "</tr>"
next
end if
udstr = udstr & "</table>"
Response.Write udstr
'Luk forbindelsen til databasen
Conn.Close
Set Conn = Nothing
end Function
Jeg kan ikke helt se hvordan det kan være et overløb af rs da jeg ikke tæller den op hvis den er nået til ende
