当前位置:编程学习 > C#/ASP.NET >>

数据不能写入,页面没有出错提示,就是数据库里面没有任何信息。

set rst=server.CreateObject("adodb.recordset") 
   <%
  set rst=server.CreateObject("adodb.recordset") 
   rst.open"select * from umimy where u_user='"&request.Form("f_user")&"'",conn,1,1
  if rst.recordcount>0 then
   response.Write"用户名:"&request.Form("f_user")&"已经被占用!请点击后退按钮返回上一页!"
    rst.close
   set rst=nothing
   conn.close
   set conn=nothing
   response.End
   else
  rst.close
  conn.BeginTrans
  rst.open"select * from umimy",conn,1,3
  rst.addnew
  rst("u_user")=request.form("f_user")
  rst("u_code")=request.form("f_code")
  rst.update
  rst.close
  End if
%> 
页面没有出错提示,打开数据库里面没有任何信息,是什么原因,请指教。 --------------------编程问答--------------------
rst.open"select * from umimy",conn,1,3 
  rst.addnew 
  rst("u_user")=request.form("f_user") 
  rst("u_code")=request.form("f_code") 
  rst.update 
  rst.close 
  '这3句放在代码最后。。
  conn.close 
  set conn=nothing 
  'response.End 
  end if
--------------------编程问答--------------------   这是ASP吧   放错版块了··· --------------------编程问答--------------------  rst.addnew 
  rst("u_user")=request.form("f_user") 
  rst("u_code")=request.form("f_code") 
    这几句明显放错位置··
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,