在关键字 'Key' 附近有语法错误 200
setrs=server.createobject("adodb.recordset")ifAction="Add1"orAction="Add2"thensql="se...
set rs=server.createobject("adodb.recordset")
if Action="Add1" or Action="Add2" then
sql="select top 1 * from article"
rs.open sql,conn,1,3
rs.addnew
call SaveData()
if Editor <> "" Then rs("Editor")=Editor
rs.update
ArticleID=rs("ArticleID")
'Response.Write(ArticleID) 'DEBUG
'Response.End() 'BEBUG
rs.close
elseif Action="Modify" then
if ArticleID="" then
founderr=true
errmsg=errmsg & "<br><li>不能确定ArticleID的值</li>"
else
ArticleID=Clng(ArticleID)
sql="select * from article where articleid=" & ArticleID
rs.open sql,conn,1,3
if rs.bof and rs.eof then
founderr=true
errmsg=errmsg & "<br><li>找不到此文章,可能已经被其他人删除。</li>"
else
dim fso,filepath
Set fso = Server.CreateObject("Scripting.FileSystemObject")
filepath = Server.MapPath("../news/"&rs("newspath"))
IF fso.fileexists(filepath) then
'fso.Deletefile (filepath)
End IF 展开
if Action="Add1" or Action="Add2" then
sql="select top 1 * from article"
rs.open sql,conn,1,3
rs.addnew
call SaveData()
if Editor <> "" Then rs("Editor")=Editor
rs.update
ArticleID=rs("ArticleID")
'Response.Write(ArticleID) 'DEBUG
'Response.End() 'BEBUG
rs.close
elseif Action="Modify" then
if ArticleID="" then
founderr=true
errmsg=errmsg & "<br><li>不能确定ArticleID的值</li>"
else
ArticleID=Clng(ArticleID)
sql="select * from article where articleid=" & ArticleID
rs.open sql,conn,1,3
if rs.bof and rs.eof then
founderr=true
errmsg=errmsg & "<br><li>找不到此文章,可能已经被其他人删除。</li>"
else
dim fso,filepath
Set fso = Server.CreateObject("Scripting.FileSystemObject")
filepath = Server.MapPath("../news/"&rs("newspath"))
IF fso.fileexists(filepath) then
'fso.Deletefile (filepath)
End IF 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询