asp中select语句错误 那位帮看下

Microsoft JET Database Engine 错误 '80040e14'
SELECT 子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确。
sSQL="select top "&ndisplayrecords&" * from "&"(select top "&nrecordsperpage*ncurrentpage&" * from "&"yeetoo_guestbook_topic order by postdatetime desc) as currentdatas"&" order by postdatetime asc"
'init connection object
if bdbconnection(objconn)=false then
vdbdisconn(objconn)
response.write("数据库连接失败.")

response.end
end if

dim objrs
set objrs=server.createobject("adodb.recordset")
objrs.open sSQL,objconn,1,1
if not(objrs.eof and objrs.bof) then
objrs.movelast

bdbconnection(objconn)是连接函数没有问题
应该是上面某个地方出的错 objrs.open sSQL,objconn,1,1提示是这句出的错

保留字 必需加[]。。如果你不知道什么是保留字。那就对字段名、数据表名都加上[]
如:select [a],[b] from [c]
温馨提示:答案为网友推荐,仅供参考
第1个回答  2008-07-13
看你的sql语句