Debugging VB6 dll for ASP page 
Author Message
 Debugging VB6 dll for ASP page

i am trying to debug a VB6 dll which is called from an ASP.
when the dll is compiled it works fine.  however , in debug mode i keep
getting the 'Error 91:
Object variable or With block variable not set'

this happens when i call the following code:

Option Explicit

Public ObjCtx
Public rsp               As Response
Public req               As Request
Public ses               As Session
Public cDB               As clsDatabase

Public Sub Main()

On Error GoTo ErrorH

   Set ObjCtx = GetObjectContext()
   Set rsp = ObjCtx("Response")
   Set req = ObjCtx("Request")
   Set ses = ObjCtx("Session")
   Set cDB = New clsDatabase

 Exit Sub

ErrorH:
 Errorhandler Err, "Main"

End Sub

the code that it errors on is:
Set rsp = ObjCtx("Response")
in the Sub Main procedure.

i do have the correct references set up and like i said everything works
fine when compiled.

thanks for any help

paul



Mon, 12 Aug 2002 03:00:00 GMT  
 Debugging VB6 dll for ASP page
Most probably you don't have the environment set up correctly to gain a
reference to the object context. Thus GetObjectContext call is failing and
the subsequent calls into the context are producing the error.

You need to have SP3 installed, have the project set to Binary compatability
and then run the project. There are further details on how to debug in the
MSDN.


Quote:
> i am trying to debug a VB6 dll which is called from an ASP.
> when the dll is compiled it works fine.  however , in debug mode i keep
> getting the 'Error 91:
> Object variable or With block variable not set'

> this happens when i call the following code:

> Option Explicit

> Public ObjCtx
> Public rsp               As Response
> Public req               As Request
> Public ses               As Session
> Public cDB               As clsDatabase

> Public Sub Main()

> On Error GoTo ErrorH

>    Set ObjCtx = GetObjectContext()
>    Set rsp = ObjCtx("Response")
>    Set req = ObjCtx("Request")
>    Set ses = ObjCtx("Session")
>    Set cDB = New clsDatabase

>  Exit Sub

> ErrorH:
>  Errorhandler Err, "Main"

> End Sub

> the code that it errors on is:
> Set rsp = ObjCtx("Response")
> in the Sub Main procedure.

> i do have the correct references set up and like i said everything works
> fine when compiled.

> thanks for any help

> paul



Sat, 17 Aug 2002 03:00:00 GMT  
 Debugging VB6 dll for ASP page
Hello Paul!

Sorry for delay in response. There is a separate Newsgroup -
Microsoft.public.inetserver.asp.components - mean for questions like these.
Can you please repost the question there - then professionals with skills
in that area will get back to you.

Thank you,
Sarath K Mallavarapu, MCSD
Internet Client Team Technical Lead (VB), Microsoft Developer Support
For information on Internet Client Development, please visit
http://msdn.microsoft.com/workshop/default.asp.



Sun, 01 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Debug VB.NET DLL(Class Library) from ASP.NET page

2. Debugging VB dll through my ASP page

3. Debugging VB dll through my ASP page

4. Debug Problem connecting between ASP pages on website and VB DLL

5. How do I use a VB6 dll to connect to a db from an asp page

6. unable to debug asp.net pages

7. ASP pages, slow, lack of debugging support - SOLUTION

8. How to debug ASP pages

9. turning on "Debugging" for ASP pages

10. Debugging an ASP page

11. Debugging ASP Pages

12. Help! - debugging VB Components - triggered from ASP Page

 

 
Powered by phpBB® Forum Software