Accessing a DB from thread
Posted on 2006-10-23
Hi, I used to have the db connection in my dialog:
But I have a lot of data to transfer, so I have put it in a thread, like this, creating the thread from the dialog:
Then the implementation of the function looks like this:
UINT WorkerThreadProc( LPVOID Param )
m_DBConn.CreateInstance( __uuidof( Connection ) );
** I could create the instance to the _ConnectionPtr, when I did it in the dialog class, but not hire in the worker thread function. Anyone have any good idea why ?