|
-
Jun 6th, 2001, 05:34 PM
#1
Preparing to Jump Out Window
sorry for the multiple post, but i just realized that more people view this forum than than the com/activex... thanks
This is driving me nuts... i have a component created that was working the last time that i used it... why won't this work!?!? * beats head against wall*... i have deleted a lot of code that would be useless on a forum...
asp returns:
Object variable or With block variable not set
and the problem is the sub Test... if i comment out the objResponse line, it runs fine...
I know that the component is instantiated, because it will execute an ado connection just fine, but when i try to use the asp intrinsic objects, it fails... any ideas?... thanks, in advance!
Code:
Private objApplication As Application
Private objRequest As Request
Private objResponse As Response
Private objServer As Server
Private objSession As Session
Public Sub OnStartPage(sc As Object)
Set objApplication = sc.Application
Set objRequest = sc.Request
Set objResponse = sc.Response
Set objServer = sc.Server
Set objSession = sc.Session
End Sub
Public Sub Test()
objResponse.Write "THIS IS A TEST"
End Sub
Public Sub OnEndPage()
Set objApplication = Nothing
Set objRequest = Nothing
Set objResponse = Nothing
Set objServer = Nothing
Set objSession = Nothing
End Sub
-
Jun 6th, 2001, 05:36 PM
#2
quick note: yes i made the proper reference to Active Server Pages Library... thanks...
-
Jun 7th, 2001, 07:53 AM
#3
Lively Member
Try this
Private objApplication As NEW Application
Do it for all of your variables.
You need to instigate (sp) the variable, and not just refernce it.
Try it and tell me if it worked!
Good Luck
Last edited by Sundance Kid; Jun 7th, 2001 at 07:58 AM.
-
Jun 7th, 2001, 08:16 AM
#4
thanks!... but vb returns that it's an invalid use of the new keyword... any other ideas?...
-
Jun 7th, 2001, 10:52 AM
#5
Black Cat
What exactly is the sc Object being passed in the OnstartPage 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.
-
Jun 7th, 2001, 11:02 AM
#6
scripting context... i need it to use the intrinsic objects in asp: server, application, session, request, and response...
-
Jun 7th, 2001, 01:06 PM
#7
Black Cat
It would seem to me that the OnStartPage isn't being fired. Can you debug it to verify?
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.
-
Jun 7th, 2001, 05:04 PM
#8
thanks... unfortunately, i'm just too damn busy to get back to it... at least not until next week... your help and input are appreciated... thanks!... i'll post again when i'm ready to pull my hair out...
-
Jun 11th, 2001, 01:46 PM
#9
Yes... i am a sertified ideeut
for anyone else that encounters this problem...
i have for sometime now been using simply
CreateObject
instead of
Server.CreateObject
in the asp page...
i'm not sure exactly why i got into this habit... maybe to extend the life of the period key... make sure you use the latter... thanks for everyone's help
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
|