ADO & Threads 
Author Message
 ADO & Threads

Hi

I have wrote a procedure to extras fields from a Access database using ADO
in MFC. It worked fine. I have now moved this procedure to a worker thread
and it crashes as soon as decalre the following varaibles:

 _ConnectionPtr pConn("ADODB.Connection");
 _RecordsetPtr pRS("ADODB.Recordset");

is there something i'm missing out, or is it not possible?

the thread is started by

 pThread = AfxBeginThread(mainloop, &ptp);

where ptp holds some parameters that i want to pass over.

--
--Keith
____________________
www.codeplusplus.co.uk



Thu, 24 Jul 2003 07:23:37 GMT  
 ADO & Threads
Just a SWAG:

Did you initialize OLE in your worker thread?

TFM3

Note: Spam-resistant e-mail address


Quote:
> Hi

> I have wrote a procedure to extras fields from a Access database using ADO
> in MFC. It worked fine. I have now moved this procedure to a worker thread
> and it crashes as soon as decalre the following varaibles:

>  _ConnectionPtr pConn("ADODB.Connection");
>  _RecordsetPtr pRS("ADODB.Recordset");

> is there something i'm missing out, or is it not possible?

> the thread is started by

>  pThread = AfxBeginThread(mainloop, &ptp);

> where ptp holds some parameters that i want to pass over.

> --
> --Keith
> ____________________
> www.codeplusplus.co.uk



Thu, 24 Jul 2003 07:59:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MSSQL & ADO & threads ???!!

2. MSSQL & ADO & threads ???!!

3. Client Server && Threads

4. Interprocess Communication && Multiple threads of execution

5. Is ADO really thread-safe?

6. Multi-Thread v.s. ADO Connection

7. free threaded ATL, MTS, ADO problem

8. Multi-threaded ADO problem in VC++

9. ADO threading model.

10. threads and ADO

11. Is ADO thread safe?

12. Jet ADO threads and performance

 

 
Powered by phpBB® Forum Software