When you access the ole db database in MSDTC, an exception is thrown. The exception information is: "Microsoft. Jet. oledb.4.0 ".ProgramThe itransactionlocal interface is not supported. Local transactions cannot be used by the current provider or fail to communicate with the basic transaction.
Originally, when creating an ole db database connection, the transaction is opened by default (automatic transaction enlistment), so if it is put in MSDTC, the above error will occur.
The solution is to disable automatic transaction processing of oledb by adding the following to the connection string:
Ole db services =-4;
In this way, not only the transaction is closed, but also the connection pool is closed. If frequent operations consume some performance, you must use them with caution!
A detailed list of available services is as follows:
Detailed introduction to ole db services in msdn: http://msdn.microsoft.com/en-us/library/ms717922 (V = vs.85). aspx
Another related Introduction: http://dcx.sybase.com/1200/en/dbprogramming/pg-oledb-oledb-conn-pool.html