[求助]怎么数据写不进数据库啊
主要代码如下:<!--#include file="inc/Conn.asp"-->
<%
mingcheng=request("mingcheng")
dizhi=request("dizhi")
lianxiren=request("lianxiren")
tel=request("tel")
tel1=request("tel1")
sheng=request("sheng")
shi=request("shi")
xian=request("xian")
dian1=request("dian1")
dian2=request("dian2")
dian3=request("dian3")
dian4=request("dian4")
keliu=request("keliu")
guanli=request("guanli")
touzi=request("touzi")
yingye=request("yingye")
money1=request("money1")
money2=request("money2")
beizhu=request("beizhu")
response.write(mingcheng)
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from join"
rs.open sql,conn,1,3 ‘第25行
rs.addnew
rs("mingcheng")=mingcheng
rs("dizhi")=dizhi
rs("lianxiren")=lianxiren
rs("tel")=tel
rs("tel1")=tel1
rs("sheng")=sheng
rs("shi")=shi
rs("xian")=xian
rs("dian1")=dian1
rs("dian2")=dian2
rs("dian3")=dian3
rs("dian4")=dian4
rs("keliu")=keliu
rs("guanli")=guanli
rs("touzi")=touzi
rs("yingye")=yingye
rs("money1")=money1
rs("money2")=money2
rs("beizhu")=beizhu
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write(beizhu)
%>
conn.asp da代码:
<%
dim conn,db
dim connstr
db="Databases/myszw.mdb" '数据库文件位置
on error resume next
connstr="DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
if err then
err.clear
else
conn.open connstr
end if
sub CloseConn()
conn.close
set conn=nothing
end sub
%>
如果把conn.asp中的红色的那一句去掉,就提示:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] FROM 子句语法错误。
/join_ok.asp, 第 25 行
是怎么回事啊