Solved

GetObjectContext()

Posted on 2000-05-11
4
477 Views
Last Modified: 2012-05-04
I've looked everywhere and tried everything trying to get this working correctly.  I have a component in which I am trying to access the ASP Intrinsic objects (Response,Request,etc..) and I continue to get the 'Object variable or with block variable not set' error message.  I've read about every article and help site that I can find concerning this issue and nothing is helping.  

I even used a Microsoft example exactly from the text and it did not work.  That article is located at: http://support.microsoft.com/support/kb/articles/Q230/1/49.ASP
This example just returned the "..." at the end of the variable and there was no object error, but it still did not access the session or application variables correctly.

My component doesn't have a problem creating the object, it just has a problem once I try and set the ASP objects.

I also read that the GetObjectContext() method is not available in Class_Initialize() or Class_Terminate(), so I have that taken into account.  I've registered the component in Transaction Server and all, but still no luck.  

Is it required that GetObjectContext() have to use Transaction Server, or does it just have to have the reference to it?  If it is possible without MTS, I would prefer to keep it that way.

This is a big issue and I would greatly appreciate all ideas anyone has.  Thanks.
0
Comment
Question by:thorner
  • 2
4 Comments
 
LVL 20

Expert Comment

by:hes
ID: 2801762
GetObjectContext Function
 
Obtains a reference to the ObjectContext that's associated with the current MTS object.
To use the GetObjectContext function, you must set a reference to Microsoft Transaction Server Type Library (mtxas.dll).
0
 

Author Comment

by:thorner
ID: 2801775
I have all of the references setup correctly, both MTS and ASP are referenced.
0
 
LVL 1

Accepted Solution

by:
a201348 earned 200 total points
ID: 2804826
I just did that yesterday and now again.
My understanding is that the GetObjectContext() in VB does not get the real objectcontext
You have to compile the project to a dll.
You can put that into MTS if you want. But it will screw your registry if you don't do it right afterwards when you go back to Vb and MTS explorer back and forth.
If you can get that ObjectContext into VB and do all the debugging in VB.
Let me know.
But otherwise, that should solve your problem.
0
 

Author Comment

by:thorner
ID: 2937558
Answer accepted
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help to rewrite script 3 94
Recordset containing single quotes 8 43
Index on a Table 6 25
Designing forms 3 18
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question