这个是投票系统,为什么我不能对数据库进行读写,现在系统提示我出错的是
错误类型:
Microsoft VBScript 运行时错误 (0x800A0006)
溢出
/bbs/tp.asp, 第 29 行
哪位朋友可以帮我看看错在那了
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<%
if request.ServerVariables("QUERY_STRING")<>""then
%>
<html><body>
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select *from tp where id=1",conn,1,1
%>
<table width="641" border="0">
<tr>
<td colspan="4">1111111111111111</td>
</tr>
<tr>
<td width="155">投票选项</td>
<td width="269">百分比示意图</td>
<td width="103">百分比</td>
<td width="96">投票人数</td>
</tr>
<tr>
<td>1</td>
<td><img src="bar.gif" width="<%=250*rs("rb1")/rs("total")%>" height="14"></td>
<td><%=rs("rb1")/rs("total")%></td>
<td><%=rs("rb1")%></td>
</tr>
<tr>
<td>2</td>
<td><img src="bar.gif" width="<%=250*rs("rb2")/rs("total")%>" height="14"></td>
<td><%=rs("rb2")/rs("total")%></td>
<td><%=rs("rb2")%></td>
</tr>
<tr>
<td>3</td>
<td><img src="bar.gif" width="<%=250*rs("rb3")/rs("total")%>" height="14"></td>
<td><%=rs("rb3")/rs("total")%></td>
<td><%=rs("rb3")%></td>
</tr>
<tr>
<td>4</td>
<td><img src="bar.gif" width="<%=250*rs("rb4")/rs("total")%>" height="14"></td>
<td><%=rs("rb4")/rs("total")%></td>
<td><%=rs("rb4")%></td>
</tr>
</table>
<p align="center"><a href="javascript:window.close()">关闭窗口</a></p>
</body></html>
<%
rs.close
set rs=nothing
else
%>
<html><body>
<form name="form1" method="get" action="<%=request.ServerVariables("SCRIPT_NAME")%>">
<table width="400" border="0" align="center">
<tr>
<td width="10"> </td>
<td width="380">111111111111</td>
</tr>
<tr>
<td> </td>
<td><input type="radio" name="radiobutton" value="rb1">
1</td>
</tr>
<tr>
<td> </td>
<td><input type="radio" name="radiobutton" value="rb2">
2</td>
</tr>
<tr>
<td> </td>
<td><input type="radio" name="radiobutton" value="rb3">
3</td>
</tr>
<tr>
<td> </td>
<td><input type="radio" name="radiobutton" value="rb4">
4</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
<%end if%>