<%
set rs=server.createobject("adodb.recordset")
sqlstr="select top 5 * from jhtdata where ggtype='n' and bumenid="& session("upart")&" order by jtime desc"
rs.open sqlstr,conn,1,1
if rs.eof or rs.bof then%>
错误提示:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
关键字 'order' 附近有语法错误。
/oa/gonggao/call_newsbm.asp, 第 4 行
------解决方案--------------------
如果bumenid是字符型:
sqlstr="select top 5 * from jhtdata where ggtype='n' and bumenid='"&session("upart")&"' order by jtime desc"
或者
你看看你的数据库字段bumenid有没有
------解决方案--------------------
<%
set rs=server.createobject("adodb.recordset")
sqlstr="select top 5 * from jhtdata where ggtype='n' and bumenid="& session("upart")&" order by jtime desc"
response.write (sqlstr)
response.end()
rs.open sqlstr,conn,1,1
%>
运行一下看看结果