日期:2014-05-17  浏览次数:20673 次

ASP记录集显示SQL超时
问题:

Select * From news where lm= "&lid& " ‘//打开页面超时。

去掉 WHERE :Select * From news ’//打开页面正常。

请教大家,该如何解决?




------解决方案--------------------
Select * From news where lm= "&lid& "
response.write(Select * From news where lm= "&lid& ")
response.end

把打印的结果放数据库 运行一下
------解决方案--------------------
楼主不是说lm为数字型吗~
那不就SELECT * FROM news WHERE lm= "&cstr(lid)
------解决方案--------------------
执行个这样的代码,为什么要用这么复杂的程序
Set rs = conn.Execute() 
试试会不会再有错误
------解决方案--------------------
有可能是你的NR的值里有些多~你试下
select top 5 id,bt from news where lm="&cstr(id)