Results 1 to 9 of 9

Thread: Preparing to Jump Out Window

  1. #1
    idover
    Guest

    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

  2. #2
    idover
    Guest
    quick note: yes i made the proper reference to Active Server Pages Library... thanks...

  3. #3
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    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.

  4. #4
    idover
    Guest
    thanks!... but vb returns that it's an invalid use of the new keyword... any other ideas?...

  5. #5
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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.

  6. #6
    idover
    Guest
    scripting context... i need it to use the intrinsic objects in asp: server, application, session, request, and response...

  7. #7
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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.

  8. #8
    idover
    Guest
    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...

  9. #9
    idover
    Guest

    Post 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
  •  



Click Here to Expand Forum to Full Width