蓝月传奇鲁大师登录器:Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 09:05:25
[Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: '=' 附近有语法错误。
/mynet/fish&cat/news/newsDiscuss.asp, 第 55 行
主要源码为:
Dim rs,rsNews
Set rs = Server.CreateObject("ADODB.RecordSet")
'È¡µÃÐÂÎÅÌâÄ¿
Set rsNews = Server.CreateObject("ADODB.RecordSet")
Set rsNews = Conn.Execute("SELECT title FROM News WHERE id = " & newsid)
If Not rsNews.EOF Then
newsTitle = rsNews("title")
End If
rsNews.Close()


Set rsNews = Conn.Execute("SELECT title FROM News WHERE id = " & newsid)
改成这样试试
Set rsNews = Conn.Execute("SELECT title FROM News WHERE id = " & val(newsid))

如果id是字符串,则应该改成
Set rsNews = Conn.Execute("SELECT title FROM News WHERE id ='" & trim(newsid) &"'")