欢迎来到天天文库
浏览记录
ID:50364794
大小:57.00 KB
页数:12页
时间:2020-03-08
《asp会员注册登录以及管理系统网页实例.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Result.asp(注册跳转结果,是否注册成功)
2、FFFFCC;}-->
3、9"> <%'创建recordset对象方法1setrst=Server.CreateObject("ADODB.recordset")rst.open"select*from[user]whereu_user='"&request.form("f_user")&"'",conn,1,1ifrst.recordcount>0then'如果从在这个用户名,对用户进行提示response.Write"用户名:"&reques4、t.form("f_user")&"已经被占用!请点击后退按钮返回上一页!"rst.closesetrst=nothingconn.closesetconn=nothingresponse.Endelserst.closeconn.begintrans'开启数据库的事务功能rst.open"select*from[user]",conn,1,3rst.addnew'插入数据到user表rst("u_user")=request.Form("f_user")rst("u_code")=request.Form("f_code")rst.updaterst.close'获取刚才插入数据的自动5、编号字段值,即u_id字段的值setrst1=conn.execute("SELECT@@IDENTITYASuid")uid=rst1("uid")rst.open"info",conn,1,3'错误分析检测语句setmyErrors=conn.errorsifmyErrors.count>0thenfori=0tomyErrors.count-1response.Write("错误原因:"&myErrors.item(i).description&"")nextendif'错误分析检测结束iferr.number<>0thenresponse.Write"ERR对象捕获错误:"6、&err.descriptionendifrst.addnew'插入数据到info表rst("i_uid")=uidrst("i_name")=request.Form("f_name")rst("i_sex")=request.Form("f_sex")rst("i_age")=request.Form("f_age")rst("i_vip")=falserst.updaterst.closeiferr.number<>0thenconn.rollbacktrans'取消之前写入数据库的内容(写入数据出错的情况下)%>7、"250"height="250"/><%elseconn.committrans%>请登录!!!<%endifendif%>
<%'创建recordset对象方法1setrst=Server.CreateObject("ADODB.recordset")rst.open"select*from[user]whereu_user='"&request.form("f_user")&"'",conn,1,1ifrst.recordcount>0then'如果从在这个用户名,对用户进行提示response.Write"用户名:"&reques
4、t.form("f_user")&"已经被占用!请点击后退按钮返回上一页!"rst.closesetrst=nothingconn.closesetconn=nothingresponse.Endelserst.closeconn.begintrans'开启数据库的事务功能rst.open"select*from[user]",conn,1,3rst.addnew'插入数据到user表rst("u_user")=request.Form("f_user")rst("u_code")=request.Form("f_code")rst.updaterst.close'获取刚才插入数据的自动
5、编号字段值,即u_id字段的值setrst1=conn.execute("SELECT@@IDENTITYASuid")uid=rst1("uid")rst.open"info",conn,1,3'错误分析检测语句setmyErrors=conn.errorsifmyErrors.count>0thenfori=0tomyErrors.count-1response.Write("错误原因:"&myErrors.item(i).description&"")nextendif'错误分析检测结束iferr.number<>0thenresponse.Write"ERR对象捕获错误:"
6、&err.descriptionendifrst.addnew'插入数据到info表rst("i_uid")=uidrst("i_name")=request.Form("f_name")rst("i_sex")=request.Form("f_sex")rst("i_age")=request.Form("f_age")rst("i_vip")=falserst.updaterst.closeiferr.number<>0thenconn.rollbacktrans'取消之前写入数据库的内容(写入数据出错的情况下)%>7、"250"height="250"/><%elseconn.committrans%>请登录!!!<%endifendif%>
7、"250"height="250"/><%elseconn.committrans%>
请登录!!!
此文档下载收益归作者所有