+ -
当前位置:首页 → 问答吧 → 缺少对象"

缺少对象"

时间:2011-12-18

来源:互联网

代码如下:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Include/Const.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<center>
<br>
<table>
<tr>
<td>注册信息</td>
</tr>
<tr>
<td>
<div align="center">
<%
yhm=request.form("yhm")
mm=request.Form("mm")
qrmm=request.Form("qrmm")

%>
<%
set rs=con.execute("select adminName from admin where adminName='"&yhm&"'")
if rs.eof =false then
response.Write( "已注册")
%>
<%
else  
set rs=con.execute("insert into admin(adminname,password) value('"&yhm&"','"&mm&"')")
response.Write("恭喜注册成功")
response.Write("您的用户名:"&yhm&"<br><br>")
response.Write("您的密码:"&mm&"<br><br>")
end if
%>





  </div></td>
  </tr>
  </table>
  </center>
  </body>
  </html>
   

作者: xmy0404   发布时间: 2011-12-18

测试时错误是:缺少对象"
错误行为27,就是标红的那一行

作者: xmy0404   发布时间: 2011-12-18

数据连接对象con没有初始化就用了,参考
http://baike.baidu.com/view/25773.htm

作者: dalmeeme   发布时间: 2011-12-18

要怎么修改啊

作者: xmy0404   发布时间: 2011-12-18