Application Development Using C or C++
Applications written in C or C++ can directly initiate MS DTC transactions. Using C or C++ to directly initiate MS DTC transactions is attractive for these reasons:
-
An application can use any OLE transaction-compliant resource manager. For the initial release of MS DTC, SQL Server is the only supported resource manager; in future releases, other resource managers will be supported.
-
An application can explicitly control the scope and duration of the transaction.
-
An application can be coded in any programming language that supports the OLE Transaction interfaces for initiating and controlling MS DTC transactions. For the initial release of MS DTC, only the C and C++ programming languages support these interfaces.
C and C++ applications that use MS DTC transactions can access SQL Server by using either ODBC or DB-Library. Both of these techniques are illustrated in the examples that follow.