DEMO - coinitialize
Joined: 29 Aug 2014
Topic: DEMO - coinitialize
Posted: 29 Aug 2014 at 7:48am
when i try to use your DEMO i always get an EOleSysError "CoInitialize has not been called"
What can i do?
Wagner R. Landgraf
Joined: 18 May 2010
|Post Options Quote Reply Posted: 29 Aug 2014 at 8:03am|
Call CoInitialize in CreateADOConnection as well. This is an ADO limitation (not RemoteDB limitation) since CoInitialize must be called in every thread. We have fixed the demo here as well.
function TForm1.CreateADOConnection: TADOConnection;
CoInitializeEx(nil, COINIT_MULTITHREADED); // Add this
ConnectionString := edConnectionString.Text;
Conn := TADOConnection.Create(nil);
Conn.ConnectionString := ConnectionString;
Conn.LoginPrompt := false;
Result := Conn;
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum