Hi to all,
I'm trying to use the SDAC Components in a console app. I've created the MSConnection. Calling the connect method I get following error:
OLE DB Error occured. Code 800401F0h.
Coinitialize has not been called.
Can anybody help me? What I have to do?
Best regards
Chris
SDAC in Console apptype
As SDAC uses OLE DB before a new connection it is necessary to initialize OLE - call CoInitialize. At common applications VCL does it automatically. SDAC cannot execute CoInitialize itself as it may cause unexpected problems at another parts of the program also using OLE. Especially it concerns CoUninitialize and CoInitializeEx calls.