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

Posted on 2003-02-24
Medium Priority
Last Modified: 2010-05-01
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.

Question by:haisai54
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

drydenhogg earned 200 total points
ID: 8015528
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.



Expert Comment

ID: 8901166
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?
LVL 49

Expert Comment

ID: 8972726
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

762 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