日期:2014-05-17  浏览次数:20896 次

新人请教一个问题!
我写了个用户管理页面   下面是代码
<html>
<head>
<title> 用户管理 </title>
<meta   http-equiv= "Content-Type "   content= "text/html;charset=gb2312 ">
</head>
<body>
<p   align= "center "> 用户管理 </p>
<!--#include   file= "ljsjk.asp "-->
<%
dim   dbcmd
Set   dbcmd=Server.CreateObject( "Adodb.Command ")
dbcmd.ActiveConnetion=dbcn
dbcmd.CommandType=1
dim   sqlstr
sqlstr= "Select   *   from   yhxx "
dbcmd.CommandText=sqlstr
Set   dbrs=dbcmd.Execute%>
<table   width= "500 "   border= "1 "   aign= "center "   cellpadding= "0 "   cellspacing= "0 ">
  <tr   bgcolor= "#EAEAEA ">
    <td> <div   align= "center "> 帐户 </div> </td>
    <td   colspan= "3 "> <div   align= "center "> 管理 </div> </td>
  </tr>
<%Do   While   not   dbrs.Eof%>
  <tr>
    <td> <%=dbrs( "zh ")%> </td>
    <td   bgcolor= "#FEFEFE "> <div   align= "center ">
  <a   href= "xxzy.asp?zh= <%=dbrs( "zh ")%> "> 详细信息 </a> </div> </td>
    <td   bgcolor= "#FEFEFE "> <div   align= "center ">
  <a   href= "xgzy.asp?zh= <%=dbrs( "zh ")%> "> 修改信息 </a> </div> </td>
    <td   bgcolor= "#FEFEFE "> <div   align= "center ">
  <a   href= "scyh.asp?zh= <%=dbrs( "zh ")%> "> 删除用户 </a> </div> </td>
  </tr>
<%dbrs.MoveNext
loop%>
</table>
<%
dbcn.Close
Set   dbcn=Nothing%>
</body>
</html>


<!--#include   file= "ljsjk.asp "--> 为
<%
Dim   dbcn
Set   dbcn=Server.CreateObject( "Adodb.Connection ")
dbcn.ConnectionString= "dbq= "&Server.MapPath( "DATA\SPXXGLXT.mdb ")& ";Driver={Microsoft   Access   Driver   (*.mdb)} "
dbcn.ConnectionTimeOut=40
dbcn.open
%>

运行后出现如下错误
错误类型:
Microsoft   VBScript   运行时错误   (0x800A01B6)
对象不支持此属性或方法:   'ActiveConnetion '
/yhgl.asp,   第   12   行

请问我该怎么解决啊!谢谢了!


------解决方案--------------------
dbcmd.ActiveConnetion=dbcn
上面的错少了个c
dbcmd.ActiveConnection=dbcn