问题任未解决,再次发帖望能解决!
页面显示正常,一旦点击了修改,就是执行了update执行修改命令就出错.
出错为
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] UPDATE 语句的语法错误。
/login/hkxx.asp, 第 17 行
自己觉得没错,因为以前也是这样写的都没问题....代码如下,全部数据类型均为文本,introduce为备注,已标记第17行.
<!--#include file="conn.asp"-->
<%
id = trim(request("id"))
action = request("action")
set rs=server.createobject("adodb.recordset")
if action = "update" then
chaid = replace(trim(request("chaid")),"'","''")
name = replace(trim(request("name")),"'","''")
mail = replace(trim(request("mail")),"'","''")
lianxi = replace(trim(request("lianxi")),"'","''")
hkfs = replace(trim(request("hkfs")),"'","''")
hktime = replace(trim(request("hktime")),"'","''")
monwy = replace(trim(request("money")),"'","''")
introduce = replace(trim(request("introduce")),"'","''")
sql = "update hk set chaid='"&chaid&"',name='"&name&"',mail='"&mail&"',lianxi='"&lianxi&"',hkfs='"&hkfs&"',
hktime='"&hktime&"',money='"&money&"',introduce='"&introduce&"' where id="&id&""
conn.execute sql →出错在这,第17行!!!!
%>
conn.asp为
<%
'on error resume next
dim conn
dim dbpath
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("../data/#@12oye.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
%>
希望解答,谢谢