PDA

Click to See Complete Forum and Search --> : COM+ simple question


lenin
Nov 22nd, 2000, 08:17 AM
Hi,
can someone tell me if it is mandatory to reference the COM+ type library if you are packaging a dll, but not using any transaction / features attributed to COM+.

Thanks

Lenin.

André
Nov 24th, 2000, 01:52 AM
If you are not using transactions nor anyother goodie from COM+ you dont need to referense the type library.
You can still install your app in COM+ and still get goodies like connection pooling ressource pooling and other good stuff.

André

lenin
Nov 24th, 2000, 04:03 AM
I thought this was the case ( as is with MTS ), but had an issue with object creation last week, which was only resolved ( by someone else ) by referencing the COM+ type library.

Thanks

Lenin.

André
Nov 24th, 2000, 04:06 AM
Wow, that's weird.
Also I have experienced doing stuff in MTS that no longer works on COM+.
I get the dreaded error:
Method'~'of object '~' failed.

It works outside COM+ but fails inside.

Weird stuff.

Good luck

André

zopailot
Nov 25th, 2000, 04:08 PM
About This Error:
Method'~'of object '~' failed

It is because Youre Object it's not
Persistable

I had This Problem too with the Dictionary

i made some test and the object is well received
but when you try toacces it's properties or method
it fails into your error!!

i even try to crate my own Collection (made my own Objects)
Based in Arrays, it worked but there was a problem
when i added an object to an item it failed,
again because of the persistency thing

Recommendations

You can Use an AdoDb.Recordset to pass

Data Trough

how

Yow can create your own recordset with the fields you need
so you can create a replic of the data in the properties of your object

then you receive the object and if you need you can Create a New Instance of your object and set the Properties Values!
I have allready tried this in Mts.

Dim Rs as New Recordset

Rs.Fields.Append("Name", adBstr)
Rs.Fields.Append("Age", adInteger)

Rs.Open

Hope it helps!

André
Nov 27th, 2000, 03:33 AM
Great, I have had headaches with this error,
Thanks, I'm trying this right away.

Any theory on why persistable solves the problem?

André

zopailot
Nov 27th, 2000, 08:10 PM
yes i think it is because an object resides in Ram

and i guess that some related information of the object
cannot be located

I'M GUESSING, I'M NOT REALLY SURE!