Solved

GetObjectContext()

Posted on 2000-05-11
4
479 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jquery to restrict certain words from input in form 11 52
JS does not refresh 6 44
IIS components 2 67
Add Rows on a Table 8 55
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

752 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