Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    COM+ MTS VB windows 2000 (Windows 2000/Com+)

    Hi,

    We are using ObjectContext with Com+ service type library in VB. we get Error 91 object "object variable or with block variable not set" though the same code worked in NT(after registry was modified with "RunwithoutContext"). We have sp5 for vb as well sp2 for win2k installed

    any idea what should be updated
    bye

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: COM+ MTS VB windows 2000 (Windows 2000/Com+)

    You sure you registered that library on the PC in question?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: COM+ MTS VB windows 2000 (Windows 2000/Com+)

    What is your code to create the object variable?

  4. #4
    Star Lounger
    Join Date
    Apr 2001
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: COM+ MTS VB windows 2000 (Windows 2000/Com+)

    Hi, thanx for replay
    We used normal steps of registering Com+ component into Component services
    ie.,
    Invoke Component Services
    Create a new Application
    Create a new component
    Add the Activex DLL Created in VB to it
    and the component was accepted by COM+ without any errors.

    Note comments are attached indicating the output

    Now the Code which client uses is as below.
    COM+ object type library was selected in References for VB.
    '*******
    Dim obj_MTS1
    Dim obj1
    Set obj_MTS1 = GetObjectContext() ' In Win2k this line returns nothing
    Set obj1 = obj_MTS1.CreateInstance("MTSTest.MTSClass1") 'throws error 91 object variable not set
    '********
    any idea what could be wrong
    (the same code works fine with MTS & NT after registry update)

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: COM+ MTS VB windows 2000 (Windows 2000/Com+)

    Please review these search results from MS for GetObjectContext. There are multiple references to how you have to use a different approach under Windows 2000. I didn't go further because I have no knowledge of MTS.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: COM+ MTS VB windows 2000 (Windows 2000/Com+)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •