Sunday, April 22, 2007

ActiveX Data Objects (ADO) 1.5/2.0/2.1 SP2 and Visual Basic Sample: Using ADO with an MTS Component via DCOM (Adomts.exe)

ActiveX Data Objects (ADO) 1.5/2.0/2.1 SP2 and Visual Basic Sample: Using ADO with an MTS Component via DCOM (Adomts.exe)

Adomts.exe is a sample that demonstrates how to use ActiveX Data Objects (ADO) to pass a disconnected recordset from a Microsoft Transaction Server (MTS) hosted DLL to a remote client via a Distributed Component Object Model (DCOM).


This sample demonstrates how to use a lightweight Standard .exe client to connect to an MTS-hosted DLL and retrieve an ADOR recordset through DCOM. This sample does not use Remote Data Service (RDS) to create the business objects.The code included here demonstrates using both the Connection.Execute and the RecordSet.Open methods to create the ADODB recordset on the server and then passes a disconnected ADOR recordset back to the client. This eliminates the need for the ADODB DLLs to reside on the client. The Server DLL has also been tested as a COM+ component that is hosted on a Windows 2000 server.