insert的问题,急
代码如下:
<!--#include file="conn.asp"-->
<%
myjpg= request.form("radiobutton")
name=session("name")
msg=rtrim(request("msg"))
myjpg="bbs/pic/"&myjpg
d=date
year1=year(d)
month1=Month(d)
if month1<10 then
month1="0"&month1
end if
day1=Day(d)
if day1<10 then
day1="0"&day1
end if
usertime=year1&month1&day1
myinto = "insert into BBS (jpg,msg,people,time) values ('"& myjpg &"','"& msg &"','"& name &"','"& usertime &"')"
'CONN.EXECUTE myinto
response.Write(myinto)
oldSQL="select talknum from user where name='"& name &"'"
Set oldrs=Conn.Execute(oldSQL)
if not oldrs.eof then
mytalk=oldrs.fields("talknum")
mytalk=mytalk+1
upSQL="update user set talknum='"& mytalk &"' where name='"& name &"'" '存新闻
CONN.EXECUTE(upSQL)
else
response.Write("姓名丢失,请重新登陆")
end if
oldrs.close
Set oldrs = Nothing
conn.close
set conn=nothing
response.redirect"../bbs.asp"
这是个BBS的入库程序,用的是ACCESS的数据库,问题很奇怪:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
/newauto/bbs/talking.asp,行23
把INSERT INTO 语句注销后UPDATA可以正常用,但把同样的INSERT INTO 语句放到SQLSEVER里运行是正常的!我郁闷了两天了,麻烦同志们看看,给个办法!