Page 1 of 1

Native SQL Client and CoInitialize

Posted: Wed 30 Jun 2010 17:25
by TinTin
if i use mssql2008,unidac config "native sql client",running in multi thread,is it need to call "CoInitialize / CoUninitialize "? The OLE DB Provider must use "CoInitialize / CoUninitialize ".

Posted: Thu 01 Jul 2010 10:17
by Dimon
Yes, you should execute the CoInitialize function in a thread and for SQL Native Client as well.

Posted: Thu 01 Jul 2010 17:29
by TinTin
I mean,if i dont use CoInitialize/CoUninitialize in Native client SQL,it can work as well? i think it is a native client, so it is different from OLEDB.

Posted: Fri 02 Jul 2010 08:39
by Dimon
UniDAC works with Native Client via OLE interface, therefore you should use CoInitialize.