|
-
November 29th, 2002, 01:23 PM
#1
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.
-
November 30th, 2002, 11:51 AM
#2
Try this
hr = m_pConn.CreateInstance(__uuidof(ADODB::Connection));
if (FAILED(hr))
//show somithing terrible message box
-
December 1st, 2002, 07:11 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|