mh_attar
asked on
using CDataBase in a multithreaded app.
I want to use ODBC in a multithreaded application.Should I worry about simultanios access to record or ODBC itself manages it (by some sort of locking)? In other words should I use critical sections , etc when updating the database or executing a query ?
If you are using DAO, it's not good idea. DAO don't support multiread/multiwrite actions.
If you use DAO, you have to create a critical section to regulate the thread access to database.
You can use ADO. It support multiread/multiwrite actions.
I hop that you resolve your problem.
Have a lot of fun!
If you use DAO, you have to create a critical section to regulate the thread access to database.
You can use ADO. It support multiread/multiwrite actions.
I hop that you resolve your problem.
Have a lot of fun!
ASKER
My question was about MFC’s ODBC database classe(CDatabase,CRecordse t,..)
and not DAO classes(CDaoDatabase , CDaoRecordest,...).
and not DAO classes(CDaoDatabase , CDaoRecordest,...).
MFC's ODBC classes are thread-safe
You can use CDatabase and Crecordset classes in any app threads without worrying about simultaneous access.
You can use CDatabase and Crecordset classes in any app threads without worrying about simultaneous access.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ghimireniraj