Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have COM+ components in a DLL registred in Windows->components.
The DLL is developed in VB and compiled using Visual Studio 6.

I can call functions in the component passing parameters and receiving values from the functions in my C++ program without problems.
The functions connects to remote DB servers and retrieves data without problem.

There are functions that returns a recordset and this is what gives me the problem.

The wrapper function is defined thus:
Adodb_tlb::_Recordset* __fastcall CheckActiveUser(long UserID/*[in]*/);

I cannot find a way of accessing this recordset in my program.
If I try to assign a variable of type: Adodb_tlb::_Recordset* to the result of this function
I get the error:

GetDefaultInterface()->CheckActiveUser(lngC_ID, (Adodb_tlb::_Recordset**)&Param3)':
Unable to enlist in the transaction. @ CompSources\\UBCore_OCX.cpp/1075"


My development environment is: "CodeGear C++Builder® 2007"

If anyone can shine a light on this I would be eternally grateful.

Thomas
Posted

1 solution

Your error message says "Unable to enlist in the transaction": this is the hint. Many years ago (in NT4) what's now called COM+ was called MTS, short for Microsoft Transaction Server, and its declared purpose was to support distributed transactions among different products.

Apparently, your COM+ component is configured with "transaction context/required".
If this is true, and you have access to the VB6 source (or to the person who wrote it), see whether you can change this to "transaction context/supported"; otherwise, you should create a transaction context in your C++ code before using the com+ component.
See also:
COM+ Interfaces [^] with emphasis on ITransactionContext interface[^].

If your COM+ component is not configured with "transaction context/required", my guess is wrong.

Hope this helps,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900