|
-
Dec 6th, 2001, 04:44 PM
#1
Thread Starter
Member
response object
In my asp page I call a component that processes a query. When the query is finished I want to return the results to the asp page. I want to use Response.Write inside my component but I keep getting an error:
"Object variable or With block variable not set"
can someone please help!
-
Dec 6th, 2001, 05:11 PM
#2
Fanatic Member
could you give an example of the code you are trying to use ?
-
Dec 6th, 2001, 05:21 PM
#3
Thread Starter
Member
Private m_Response As Response
Public Sub OnStartPage(objScriptingContext As ScriptingContext)
Set m_Response = objScriptingContext.Response
End Sub
Public Sub WebOutput(strMessage As String, Optional boxMsg)
m_Response.Write strMessage
End Sub
Public Sub OnEndPage()
Set m_Response = Nothing
End Sub
-
Dec 6th, 2001, 06:01 PM
#4
Fanatic Member
wow, ok, i dont know any of that stuff. sorry. thought i could help.
-
Dec 6th, 2001, 08:35 PM
#5
Thread Starter
Member
Thanks anyways. If anybody can help i'd appreciate it.
-
Dec 7th, 2001, 12:52 AM
#6
PowerPoster
hi
you will need a page object to write to the page from the component.
-
Dec 7th, 2001, 07:40 AM
#7
Black Cat
reference MS ASP Object Library:
VB Code:
Option Explicit
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
'get references to the ASP built in objects
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Public Sub OnEndPage()
'release the references
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|