Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


MTS - Run Time Error 91

MTS - Run Time Error 91

MTS - Run Time Error 91


Components A and B are in MTS. Both A and B declared transactional...

Component A calls Components B with CreateInstance..
Component B just calls an SP in SQL Server 7.0

In Vb App, create an For loop say 1000 times... create A with either New or CreateObject...and then set it to nothing..

First instance runs fine..
Start another instance, Run time error 91 right away...

Is there any tuning to be done...seems like MTS is unable to create the instance for B inside A..
can anyone help...???

RE: MTS - Run Time Error 91

Are you passing a blank recordset to method in classB. If yes then create a structure for the recorset and then send it. Another option you can try is build the dll with No compatiblity and then with Binary compatiblity.
This can solve the problem.

Quite a few time s we had to re-install the service pack, recompile the dll and then run the app to solve the problem.

RE: MTS - Run Time Error 91

Thanks Vinod,

But, we do compile with Binary compatibilty. The class B returns a recordset. In my test case, all the sp did was check login and return a recordset of one row indicating any errors.

I still have the problem. Any pointers would be helpful.


RE: MTS - Run Time Error 91

Check if u have called Setcomplete/Setabort in the rootobject.

Program u'r components A and B such that they are stateless, i.e dont hold any stateful reference.

Try to set the first instance to nothing and again go for a new instance of A.

RE: MTS - Run Time Error 91

Problem has been solved already.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close