-
ADO threads in win98
Hi,
im using ADO to read an Access 2000 database. Now i tried to do the reading in a separate thread using AfxBeginThread. This works fine with Windows 2000, but crashes with Windows 98, when I try to create the connection object:
TESTHR(hr = m_pConn.CreateInstance(__uuidof(ADODB::Connection)));
Any ideas?
Thanks,
Winni.
-
Try this
hr = m_pConn.CreateInstance(__uuidof(ADODB::Connection));
if (FAILED(hr))
//show somithing terrible message box
-
Solution
Hi,
the problem was, that i had to call CoInitialize/CoUninitialize in the thread routine. After inserting this it works. Strange, that win 2000 doesn´t mind.
Thanks,
winni