Set Context = GetObjectContext()
Set Response = Context("Response")
第二句就报错了
object variable or with block variable not set
网上看到有人说是空的关系,不太懂,该如何解决呢,各位帮帮忙
...全文
143916打赏收藏
object variable or with block variable not set,怎么解决
VB调试dll 一开始就错了 Set Context = GetObjectContext() Set Response = Context("Response") 第二句就报错了 object variable or with block variable not set 网上看到有人说是空的关系,不太懂,该如何解决呢,各位帮帮忙
Dim Response As Response
Dim Request As Request
Dim Server As Server
Dim Application As Application
Dim Session As Session
Dim Context As ObjectContext
Dim Conn As ADODB.Connection
Dim Rs As ADODB.Recordset
Private Sub Class_Initialize()
Set Context = GetObjectContext
Set Response = Context("Response")
Set Request = Context("Request")
Set Server = Context("Server")
Set Application = Context("Application")
Set Session = Context("Session")
Call OpenDB
End Sub
Private Sub Class_Terminate()
Set Context = Nothing
Set Response = Nothing
Set Request = Nothing
Set Server = Nothing
Set Application = Nothing
Set Session = Nothing
Call CloseDB
End Sub
Dim Response As Response
Dim Request As Request
Dim Server As Server
Dim Application As Application
Dim Session As Session
Dim Context As ObjectContext
Set Context = GetObjectContext
Set Response = Context("Response")
Set Request = Context("Request")
Set Server = Context("Server")
Set Application = Context("Application")
Set Session = Context("Session")