asp更新记录错误
下面是asp代码,老是显示update语句错误,但找不到错在哪里,<%setconn=Server.Createobject("adodb.connection")con...
下面是asp代码,老是显示update语句错误,但找不到错在哪里,
<%
set conn=Server.Createobject("adodb.connection")
conn.open"Provider=Microsoft.Jet.OLEDB.4.0;"& _
"Data Source=" & Server.MapPath("master")
set rs=Server.Createobject("adodb.recordset")
materialno = request.form("materialno")
materialdesc = request.form("materiaodesc")
location = request.form("location")
username = request.form("username")
department = request.form("department")
exec="update material set materialno='"&materialno&"',materialdesc='"&materialdesc&"',location='"&location&"',username='"&username&"',department='"&department&"' where materialno="&materialno&""
rs.open conn,exec,1,3
response.write("<script>javascript:alert("更新成功!")</script>")
response.redirect("<script>javascript:history.go(-1)</script>")
%> 展开
<%
set conn=Server.Createobject("adodb.connection")
conn.open"Provider=Microsoft.Jet.OLEDB.4.0;"& _
"Data Source=" & Server.MapPath("master")
set rs=Server.Createobject("adodb.recordset")
materialno = request.form("materialno")
materialdesc = request.form("materiaodesc")
location = request.form("location")
username = request.form("username")
department = request.form("department")
exec="update material set materialno='"&materialno&"',materialdesc='"&materialdesc&"',location='"&location&"',username='"&username&"',department='"&department&"' where materialno="&materialno&""
rs.open conn,exec,1,3
response.write("<script>javascript:alert("更新成功!")</script>")
response.redirect("<script>javascript:history.go(-1)</script>")
%> 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询