asp向数据库添加新记录出问题
<%dimrs_liuyanAddDate=date()xm=Request.Form("xm")szxy=Trim(request.form("szxy"))lynr=...
<% dim rs_liuyan
AddDate=date()
xm=Request.Form("xm")
szxy=Trim(request.form("szxy"))
lynr=trim(request.form("lynr"))
Conn.Open
set rs_liuyan=server.createobject("adodb.recordset")
sqltext="select * from sen"
rs_liuyan.open sql,conn,1,3
rs_liuyan.addnew
rs_liuyan("mname")=xm
rs_liuyan("mxy")=szxy
rs_liuyan("mly")=lynr
rs_liuyan("mtime")=AddDate
conn.execute("insert into sen(mname,mxy,mly,mtime) values('"+xm+"','"+szxy+"','"+lynr+"','"+AddDate+"')")
rs_liuyan.update
%>
<%
response.Write AddDate
response.Write xm
response.Write szxy
response.Write lynr
rs_liuyan.close
set rs_liuyan=nothing
%> 展开
AddDate=date()
xm=Request.Form("xm")
szxy=Trim(request.form("szxy"))
lynr=trim(request.form("lynr"))
Conn.Open
set rs_liuyan=server.createobject("adodb.recordset")
sqltext="select * from sen"
rs_liuyan.open sql,conn,1,3
rs_liuyan.addnew
rs_liuyan("mname")=xm
rs_liuyan("mxy")=szxy
rs_liuyan("mly")=lynr
rs_liuyan("mtime")=AddDate
conn.execute("insert into sen(mname,mxy,mly,mtime) values('"+xm+"','"+szxy+"','"+lynr+"','"+AddDate+"')")
rs_liuyan.update
%>
<%
response.Write AddDate
response.Write xm
response.Write szxy
response.Write lynr
rs_liuyan.close
set rs_liuyan=nothing
%> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询