asp post提交数据
我在提交数据时出现如下提示MicrosoftJETDatabaseEngine'80040e14'FROM子句语法错误。检查了很久没有发现哪里有问题,请帮助一下提交代码如...
我在提交数据时出现如下提示
Microsoft JET Database Engine '80040e14'
FROM 子句语法错误。
检查了很久没有发现哪里有问题,请帮助一下
提交代码如下:
<%
'add----------------------
if request("Action")="Add" then
uxm=request.form("xm")
uxb=request.form("xb")
uzy=request.form("zy")
ucs=request.form("cs")
udz=request.form("dz")
uyh=request.form("yh")
uyhzh=request.form("yhzh")
uysj=request.form("ysj")
ulsj=request.form("lsj")
udzj=request.form("dzj")
uwzj=request.form("wzj")
uxlt=request.form("xlt")
udlt=request.form("dlt")
uhid=request.form("hid")
uswbh=request.form("swbh")
ujf=request.form("jf")
ujfsj=request.form("jfsj")
ujfdz=request.form("jfdz")
ujfbh=request.form("jfbh")
If uxm="" Then
Response.Write "<script>alert(""请输入姓名!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If uzy="" Then
Response.Write "<script>alert(""请输入职业!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If ucs="" Then
Response.Write "<script>alert(""请输入出生!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If udz="" Then
Response.Write "<script>alert(""请输入地址!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If uyh="" Then
Response.Write "<script>alert(""请输入银行!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If uyhzh="" Then
Response.Write "<script>alert(""请输入银帐号!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
set rs=server.createobject("adodb.recordset")
sql="select * from user where u_xm='"& uxm &"'"
rs.open sql,conn,1,3
if (rs.eof and rs.bof) then
rs.addnew
rs("u_xm")=uxm
rs("u_xb")=uxb
rs("u_zy")=uzy
rs("u_cs")=ucs
rs("u_dz")=udz
rs("u_yh")=uyh
rs("u_yhzh")=uyhzh
rs("u_ysj")=uysj
rs("u_lsj")=ulsj
rs("u_dzj")=udzj
rs("u_wzj")=uwzj
rs("u_xlt")=uxlt
rs("u_dlt")=udlt
rs("u_hid")=uhid
rs("u_jf")=ujf
rs("u_jfsj")=ujfsj
rs("u_jfdz")=ujfdz
rs("u_jfbh")=ujfbh
rs("u_swbh")=uswbh
rs.update
rs.close
else
response.Write("<script>alert(""用户已存在!"");location.href=""main_1.asp"";</script>")
end if
end if
set rs=nothing
conn.close
set conn=nothing
%>
提交语句如下:
<form method="POST" action="main_1.asp?Action=Add" id="Manage" name="Manage"> 展开
Microsoft JET Database Engine '80040e14'
FROM 子句语法错误。
检查了很久没有发现哪里有问题,请帮助一下
提交代码如下:
<%
'add----------------------
if request("Action")="Add" then
uxm=request.form("xm")
uxb=request.form("xb")
uzy=request.form("zy")
ucs=request.form("cs")
udz=request.form("dz")
uyh=request.form("yh")
uyhzh=request.form("yhzh")
uysj=request.form("ysj")
ulsj=request.form("lsj")
udzj=request.form("dzj")
uwzj=request.form("wzj")
uxlt=request.form("xlt")
udlt=request.form("dlt")
uhid=request.form("hid")
uswbh=request.form("swbh")
ujf=request.form("jf")
ujfsj=request.form("jfsj")
ujfdz=request.form("jfdz")
ujfbh=request.form("jfbh")
If uxm="" Then
Response.Write "<script>alert(""请输入姓名!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If uzy="" Then
Response.Write "<script>alert(""请输入职业!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If ucs="" Then
Response.Write "<script>alert(""请输入出生!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If udz="" Then
Response.Write "<script>alert(""请输入地址!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If uyh="" Then
Response.Write "<script>alert(""请输入银行!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
If uyhzh="" Then
Response.Write "<script>alert(""请输入银帐号!"");location.href=""javascript:history.back()"";</script>"
Response.end()
end if
set rs=server.createobject("adodb.recordset")
sql="select * from user where u_xm='"& uxm &"'"
rs.open sql,conn,1,3
if (rs.eof and rs.bof) then
rs.addnew
rs("u_xm")=uxm
rs("u_xb")=uxb
rs("u_zy")=uzy
rs("u_cs")=ucs
rs("u_dz")=udz
rs("u_yh")=uyh
rs("u_yhzh")=uyhzh
rs("u_ysj")=uysj
rs("u_lsj")=ulsj
rs("u_dzj")=udzj
rs("u_wzj")=uwzj
rs("u_xlt")=uxlt
rs("u_dlt")=udlt
rs("u_hid")=uhid
rs("u_jf")=ujf
rs("u_jfsj")=ujfsj
rs("u_jfdz")=ujfdz
rs("u_jfbh")=ujfbh
rs("u_swbh")=uswbh
rs.update
rs.close
else
response.Write("<script>alert(""用户已存在!"");location.href=""main_1.asp"";</script>")
end if
end if
set rs=nothing
conn.close
set conn=nothing
%>
提交语句如下:
<form method="POST" action="main_1.asp?Action=Add" id="Manage" name="Manage"> 展开
3个回答
展开全部
sql="select * from user where u_xm='"& uxm &"'"
你 把这个SQL打出来看看,估计 uxm 这个变量是空的
你 把这个SQL打出来看看,估计 uxm 这个变量是空的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
set rs=server.createobject("adodb.recordset")
sql="select * from user where u_xm='"& uxm &"'"
rs.open sql,conn,1,3
'这里加一句
response.write sql
response.end
'试看看u_xm等于多少
if (rs.eof and rs.bof) then
sql="select * from user where u_xm='"& uxm &"'"
rs.open sql,conn,1,3
'这里加一句
response.write sql
response.end
'试看看u_xm等于多少
if (rs.eof and rs.bof) then
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
检查一下你的Sql语句
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询