The OLEInit setting controls how CONNX will initialize the OLE Subsystem. Based on what it finds in OLEInt, CONNX initializes the OLE Subsystem as either Apartment-Threaded or Multi-Threaded.
OLEINIT=2
When OLEInit = 2, CONNX initializes the OLE Subsystem as Apartment-Threaded.
Apartment-threading, while allowing for multiple threads of execution, serializes all incoming calls by requiring that calls to methods of objects created by this thread always run on the same thread - the apartment/thread that created them.
When OLEInit = 0, CONNX initializes the OLE Subsystem as Multi-Threaded.
Multi-threading (also called free-threading) allows calls to methods of objects created by this thread to be run on any thread. There is no serialization of calls - many calls may occur to the same method or to the same object or simultaneously.
Multi-threaded object concurrency offers the highest performance and takes the best advantage of multi-processor hardware for cross-thread, cross-process, and cross-machine calling, since calls to objects are not serialized in any way.
We recommend that OLEInit be set to 0 (Multi-Threaded). This allows the must flexibility and provides the best performance for multi-threaded applications. However, some OLEDB Providers may required their OLE Subsystem to be initialized as Apartment-Threaded. If this is necessary, set OLEINIT to 2.
The default value is 0.
Environments: Client, Windows
Configuration Manager: CONNX Settings; Current Key = CONNX; Key Value/Value Name = OLEInit