内存不足Microsoft VBScript运行时错误800a0007

时间:2017-03-17 20:19:48

标签: mysql vbscript asp-classic adodb

  

Microsoft VBScript运行时错误“800a0007”

     

内存不足:'TheDB.Execute'

     

page.asp,第232行

数据库:Mysql

Public Sub SET_L(RAZA)
Flag=0         
sel = "SELECT id,unit,pindate FROM tbl_users where  id='" & RAZA & "' and pindate =NOW()-INTERVAL 1 DAY"
Set rs2 = TheDB.Execute(sel) <<--- line 232    
If Not rs2.EOF = True Then
Flag=1
LSD=LSD+rs2("unit")        
end if
End Sub

Public Sub SET_R(RAZA)
Flag=0         
sel = "SELECT id,unit,pindate FROM tbl_users where  id='" & RAZA & "' and pindate =NOW()-INTERVAL 1 DAY"
Set rs2 = TheDB.Execute(sel)     
If Not rs2.EOF = True Then
RSD=RSD+rs2("unit") 
end if        
End Sub

无法找出原因.... :(

1 个答案:

答案 0 :(得分:0)

这可能是由于没有正确关闭记录集和连接对象并将其引用设置为空。确保每次使用这些对象时都这样做:

myRecordset.close
myConnection.close
set myRecordset = nothing
set myConnection = nothing