运行第一次时成功,第二次...失败????????
wubb 2000-05-11 11:18:00 代码如下:
<%
If application("topthree")="" then
sql="select top 3 * from activeinfo order by Date desc"
DbPath = SERVER.MapPath("../activeinfo/activeinfo.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
Set rs = conn.Execute( sql )
Set application("topthree") = rs
else
Set rs = application("topthree")
End If
%>
第一次运行时,也就是application("topthree")为空时,成功,若
application("topthree")非空时,错误信息如下:
错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
p1.asp, 第 2 行
若在前面加一行application("topthree")="",则成功运行,但是,我的目的,嘿嘿。
请大虾不吝赐教,谢谢