Jag har stött på ett litet problem.. Det lyder:
ADODB.Recordset.1 error '800a0e79'
Invalid operation on open object
/bos/sub_w.asp, line 7
Koden är:
<!--#include file="c.asp"-->
<%
b = Request.Querystring("b")
Function weapon(w_id)
get_weapon = "SELECT * FROM weapons WHERE ID = " & w_id
RecSet.Open get_weapon, Connect, AdOpenDynamic ' Rad 7
If RecSet.EOF Then
Response.Write "<img src=""error.gif"">"
Else
Response.Write "<img src=""" & RecSet("gfx") & """>"
End If
RecSet.Close
End Function
%>
<html>
<head>
<title><%=c_title%></title>
<%=css%>
<script language="JavaScript">
<!--
function bitch(url) {window.open(url,'BOSBitch','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=350');}
//-->
</script>
</head>
<body background="gfx/bos/m_bg.jpg">
<%
If b <> "" Then
get_bitch_info = "SELECT * FROM bitches WHERE ID = " & b
RecSet.Open get_bitch_info, Connect, AdOpenDynamic
' Write headers
Response.Write "<hr size=""1"" color=""#FFFFFF"" noshade>"
Response.Write "<table align=""center"" border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"
'Check if bitch exists
If RecSet.EOF Then
' Bitch don't exist, return error
Response.Write "<tr><td><font size=""2"" face=""verdana"" color=""#FFFFFF""><b>That bitch dosn't exist!</b></font></td></tr>"
Else
' Bitch exists, return information
Response.Write "<tr><td><font size=""2"">Bitch name</font></td><td><font size=""2"">" & RecSet("name") & "</font></td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch real name</font></td><td><font size=""2"">" & RecSet("real") & "</font></td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch age</font></td><td><font size=""2"">" & RecSet("age") & "</font></td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch city</font></td><td><font size=""2"">" & RecSet("city") & "</font></td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch favorite map</font></td><td><font size=""2"">" & RecSet("f_map") & "</font></td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch CT favorite pistol</font></td><td>" & weapon(RecSet("ct_f_pistol")) & "</td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch CT favorite weapon</font></td><td>" & weapon(RecSet("ct_f_weapon")) & "</td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch T favorite pistol</font></td><td>" & weapon(RecSet("t_f_pistol")) & "</font></td></tr>"
Response.Write "<tr><td><font size=""2"">Bitch T favorite weapon</font></td><td>" & weapon(RecSet("t_f_weapon")) & "</font></td></tr>"
End If
' End the table
Response.Write "</table>"
End If
%>
</body>
</html>
Det är när jag anropar functionen weapon() med ett tal (som hämtas från en db) som det cpar sig.
Någon av nattugglorna som kan hjälpa mig? svara gärna via icq: 124254758 eller msn: wi99dhh@hotmail.com