converting from com to com+
Posted on 2002-03-12
We have a com object that is called in ASP pages, Access and VB Programs. We decided to move over to COM+ in order to be able to be able to benefit from COM+ transactions. Since I converted the dll I've been running into problems like not being able to say myRecordset.close after an insert fails (maybe this has something to do with passing the recordset reference between procedures.) We are using W2K Server, Our workstations are W2K and W98.
These are the steps I took to convert. Please tell me what I might have missed and what other code has to be changed in order to convert properly.
Changed each class to RequireNewTransaction
Added IMPLEMENTS OBJECTCONTEXT and included the 3 methods:
Activate, Deactivate and AllowObjectPooling (or whatever - I'm not in front of the code now)
I changed all the Dim rs as New ADODB.Recordset to
Dim rs as ADODB.Recordset
set rs = objcont.CreateInstance("ADODB.Recordset")
-btw, is it correct to do this? Do I only have to use create Instance for myObject?
I added methods to SetAbort and SetComplete
I set references to the COM+ library (there are a few - which is the right one?)
I compiled as Binary
I created a new COM+ package and added the DLL (sometimes I see that If I make changed to the DLL it is not reflected in the package unless I delete the package and recreate. Then i will see changes that I made - why is that?)
Ok that is a mouthful. I wouldn't mind if someone could direct me to a TO THE POINT MSDN article that spells this out clearly. There are articles out but I found none that spell out the necessary steps and well as problems to watch out for.
I would appreciate as much guidance as possible as SOON AS POSSIBLE (I have a dealine!!!!!! (don't we all?))