| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 524 人关注过本帖
标题:运行程序时提示0x80020009错!请高人指点迷津
只看楼主 加入收藏
woxiuwosheng
Rank: 1
来 自:北京
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-8-21
收藏
 问题点数:0 回复次数:0 
运行程序时提示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
       
        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">&nbsp;</td>
<td width="646">&nbsp;</td>
<td width="75">&nbsp;</td>
</tr>
<tr>
<td height="337">&nbsp;</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>
[bo]<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>[/bo]<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" name="Submit" value="修改会员资料"  />  &nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit2" value="重置表单" /></td>
</tr>
</table>
</form>
</td>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
<%
set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>
这是代码 在运行时提示0x80020009错误 说是意外错误 是什么原因该如何解决呢 小弟先谢谢了 黑体部分是提示的错误部分
搜索更多相关主题的帖子: 高人 提示 
2008-08-21 16:39
快速回复:运行程序时提示0x80020009错!请高人指点迷津
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018138 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved