what are the differences in developing COM components for MTS to regular COM componets

Can any one help me to know the diffences/special things if any, that we need to take care while developing the COM componets that are to be installed on MTS  to that of a regular COM component.

Who is Participating?
drydenhoggConnect With a Mentor Commented:
Programming for MTS can be quite different to programming normal VB stuff depending on your own style.

Primary differences are:

All objects must be stateless, so no properties, no module level variables. The business classes are to contain business rules only and not data. If you already programme in this style its no problems, for those that heavily use properties and rely on previously set values, this is a major change of perception.

Data serialisation (how the data gets from server to client) becomes very important. Most common is to use ADO disconnected recordsets. Data gets returned in the same manner, by reconnection and updating batch.


Connection pooling becomes available thru MTS, but last I remember the connection strings must be identical, which means if you have the UserID and Pwd within the connection string per user, the pooling wont occur. This can change how you handle authentication within the application.

Traditional VB programs grab resources early, and release them late, im sure youve written programmes that get the connection to the database at the start and dont release them until the program is closed. Under MTS you want to completely reverse that, obtain the connection as late as possible, and release as early as possible.
Dont worry about connection latency, thats what the connection pooling is there for.

All the vb objects can be transactionalised with objectcontext object. At the end of a method within the class, you choose to objcontext.setabort or .setcomplete.
This also releases the object back to the object pool, so whilst you may not be using transactions, if you fail to setcomplete, MTS presumes its an abort.


This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Moderator, my recommended disposition is:

    Accept drydenhogg's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.