indyrhett Posted June 26, 2017 Share Posted June 26, 2017 Hi I'm trying to connect to a TUniConnection with a Devart component that connects use OLEDB to an SQL Server. I'm simply placing on a MainModule like the help specifies and on the MainModuleConnect I'm issuing: UniConnection1.Connected := True; Running this app throws a CoInitialize has not been called error. If I add ActiveX to the uses and call instead: Coinitialize(0); UniConnection1.Connected := True; Then everything works as expected - however I've read this isn't a great idea. Anyone have an idea what I might be doing wrong here? Thanks, Rhett Price IndySoft Quote Link to comment Share on other sites More sharing options...
Oliver Morsch Posted June 26, 2017 Share Posted June 26, 2017 (Uni)ServerModule -> AutoCoInitialize -> True Quote Link to comment Share on other sites More sharing options...
indyrhett Posted June 26, 2017 Author Share Posted June 26, 2017 Ah... perfect. Works great. Thanks! - Rhett Quote Link to comment Share on other sites More sharing options...
Kadir2154 Posted December 25, 2017 Share Posted December 25, 2017 Thank You Quote Link to comment Share on other sites More sharing options...
stylecc@China Posted August 7, 2019 Share Posted August 7, 2019 Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.