suppress CoInitialize call within CSession::Open()



Platform - Windows XP, OleDB, VC8

Database - Oracle, Microsoft Access





Hi,





I have developed multithread application. Each worker threads uses OleDB to
access data. Code is given below:





CDataSource ds;

void Run()

{

HRESULT hr = CoInitializeEx(NULL,COINIT_MULTITHREADED);





CSession session;





// start the session

hr = session.Open(ds); // suppose data source is already open

if(FAILED(hr))

{

cout << "Can't open SESSION" << endl;

return -1;

}

....

....

....





CoUninitialize();

}





When I profile this application using AQTime I found error that is

'Cannot

change thread mode after it is set'. When I check stack for this error I

found that there is CoInitialize() call within CSession::Open(). Is

there

any way to supperess CoInitialize() call within CSession::Open() because

my

program is already calling CoInitializeEx(NULL,COINIT_MULTITHREADED).





Thanks in advance,





Vijay Singh

EDISPHERE Software






.



Relevant Pages

  • CoInitialize call within CSession::Open()
    ... Platform - Windows XP, OleDB, VC8 ... Database - Oracle, Microsoft Access ... Each worker threads uses OleDB to ... any way to supperess CoInitialize() call within CSession::Openbecause my ...
    (microsoft.public.data.oledb)
  • Re: Access, OleDb, Insert or Update
    ... Especially a busy WAN. ... best options are Terminal Server or SQL Server. ... You might want to go back and try the OleDB etc solutions but I'm not very hopeful. ... Tony Toews, Microsoft Access MVP ...
    (comp.databases.ms-access)
  • RE: ADO
    ... It is a mechanism that connects requests to the physical data store. ... Where OLEDB can be generated by JET 4.0 engine, it is a database engine that used in Microsoft Access 2000 and was chosen because it is FREE and is already installed on most versions of Windows. ...
    (microsoft.public.data.ado)
  • RE: Access 2003 - Inserting A Quick Time Movie - Data Access Page
    ... How is oledb used there? ... > Someone I know is using Microsoft Access 2003 to create a Data Access ...
    (microsoft.public.data.oledb)