首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

rs.eof rs.bof 一直为true解决方案

2012-03-28 
rs.eof rs.bof 一直为true我把sql语句response.write出来直接运行都有数据,为什么这样就为空?而且好象rs确

rs.eof rs.bof 一直为true
我把sql语句response.write出来直接运行都有数据,为什么这样就为空?而且好象rs确实没取到东西,因为rs.getrow也报错,请问是怎么回事?
Set   conn   =   server.createobject( "adodb.connection ")
conn.open   MM_inteheldb_STRING
Set   rs   =   server.CreateObject( "adodb.recordset ")
sqlstr   =   "Select   Exception_Desc.EXCEPTION_DESC,Exception_INFO.EXCEPTION_CAUSE,Exception_INFO.EXCEPTION_TIME   from   Exception_Desc,Exception_INFO   where   Exception_INFO.EXCEPTION_TIME   between   to_date( ' "   &   starttime   &   " ', 'YYYY-MM-DD   HH24:MI:SS ')   and   to_date( ' "   &   endtime   &   " ', 'YYYY-MM-DD   HH24:MI:SS ')   and   Exception_Desc.EXCEPTION_CODE   =   Exception_INFO.EXCEPTION_CODE "

rs.open   sqlstr,conn,3,3
response.write   rs.eof   &   "--- "&   rs.bof  


[解决办法]
sqlstr = "Select Exception_Desc.EXCEPTION_DESC,Exception_INFO.EXCEPTION_CAUSE,Exception_INFO.EXCEPTION_TIME from (Exception_Desc inner join Exception_INFO on Exception_Desc.EXCEPTION_CODE = Exception_INFO.EXCEPTION_CODE) where Exception_INFO.EXCEPTION_TIME between to_date( ' " & starttime & " ', 'YYYY-MM-DD HH24:MI:SS ') and to_date( ' " & endtime & " ', 'YYYY-MM-DD HH24:MI:SS ') "

热点排行