Solved

GetObjectContext()

Posted on 2000-05-11
4
475 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Issue with Loop 4 57
SQL Server Web Traffic Limitations 4 60
Error viewing ASP page 12 163
JS does not refresh 6 18
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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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