| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
高端软件开发 = 年薪十万不是梦赛孚耐:软件保护加密专家身份认证令牌USB KEY 
共有 147 人关注过本帖
标题:运行程序时提示0x80020009错!请高人指点迷津
收藏  订阅  推荐  打印 
本主题由 静夜思 于 2008-8-21 19:34 拒绝承认原创
woxiuwosheng
Rank: 1
来自:北京
等级:新手上路
帖子:2
积分:120
注册:2008-8-21
运行程序时提示0x80020009错!请高人指点迷津

<!-- #include file="db.inc.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员资料修改</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
.STYLE1 {color: #FF0000}
-->
</style></head>
<body>
<%
on error resume next
set rst=server.CreateObject("adodb.recordset")
id=request.QueryString("id")
if request.QueryString("act")="modify" then
'如果是修改数据
conn.begintrans
'sql="update user set u_user='"& request.Form("f_user") &"',u_code='"& request.Form("f_code") &"' where u_id="& id
'sql1="update user set i_name='"& request.Form("f_name") &"',i_sex='"& request.Form("f_sex") &"'"
'sql1=sql1 & ",i_age='"& request.Form("f_age") & "',i_vip="
    'if request.Form("f_vip")=1 then
     ' sql1=sql1 & "true"
    'else
       'sql1=sql1 & "false"
     'end if
    ' sql1=sql1+" where i_uid=" & id
     'conn.execute sql
     'conn.execute sql1
     rst.open"select * from user where u_id=" & id,conn,1,3
     rst("u_user")=request.Form("f_user")
     rst("u_code")=request.Form("f_code")
     rst.update
     rst.close
     rst.open"select * from info where i_uid=" & id,conn,1,3
     rst("i_name")=request.Form("f_name")
     rst("i_sex")=request.Form("f_sex")
     rst("i_age")=request.Form("f_age")
         if request.Form("f_vip")=1 then
             rst("i_vip")=true
         else
             rst("i_vip")=false
          end if
     rst.update
     rst.close
     if err.number<>0 then
        conn.rollbacktrans
        response.Write("修改会员失败!")
     else
        conn.committrans
        response.Write("修改会员成功!")
     end if
    end if
     %>
<table width="800" height="573" border="0" align="center" cellspacing="0">
<tr>
<td height="573" align="center" valign="top" background="img/hyzlxg.jpg"><table width="800" border="0" cellspacing="0">
<tr>
<td width="73" height="164"> </td>
<td width="646"> </td>
<td width="75"> </td>
</tr>
<tr>
<td height="337"> </td>
<td align="center" valign="middle" bgcolor="#F9F9F9"><a href="admin.asp">返回会员列表</a>
<%
rst.open"select * from user where u_id="& request.QueryString("id"),conn,1,1
%>
<form id="form1" name="form1" method="post" action="modify.asp?act=modify&id=<%=request.QueryString("id")%>">
<table width="90%" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="3">请在下面修改会员资料,红色<span class="STYLE1">*</span>号所标示的选项为必填项</td>
</tr>
<tr>
<td width="24%" align="right">用户名:</td>
<td width="37%" align="left"><input name="f_user" type="text" id="f_user" value="<%=rst("u_user")%>" /></td>
<td width="39%" align="left"><span class="STYLE1">*
</span></td>
</tr>
<tr>
<td align="right">密码:</td>
<td align="left"><input name="f_code" type="text" id="f_code" value="<%=rst("u_code")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<%
rst.close
rst.open"select * from info where i_uid=" & request.QueryString("id"),conn,1,1
%>
<tr>
<td align="right">姓名:</td>
<td align="left"><input name="f_name" type="text" id="f_name" value="<%=rst("i_name")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">性别:</td>
<td align="left"><select name="f_sex" id="f_sex">
<option value="男" selected="selected">男</option>
<option value="女" <% if rst("i_sex")="女" then response.Write("selected")%>>女</option>
</select>              </td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">年龄:</td>
<td align="left"><input name="f_age" type="text" id="f_age" size="8" value="<%=rst("i_age")%>" /></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<%
rst.close
%>
<tr>
<td align="right">是否会员:</td>
<td align="left"><input name="f_vip" type="radio" value="1"  <% if rst("i_vip") then response.Write("checked") %> />

<input name="f_vip" type="radio" value="0" <% if not rst("i_vip") then response.Write("checked") %> />
否</td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" name="Submit" value="修改会员资料"  />     
<input type="reset" name="Submit2" value="重置表单" /></td>
</tr>
</table>
</form>
</td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<%
set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>
这是代码 在运行时提示0x80020009错误 说是意外错误 是什么原因该如何解决呢 小弟先谢谢了 黑体部分是提示的错误部分
搜索更多相关主题的帖子: 高人  提示  
2008-8-21 16:39
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.057956 second(s), 10 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved