|
-
April 7th, 1999, 02:27 PM
#1
ODBC and Multithread
In my ODBC application, I created a CDatabase object at the application level, open a connection to this database and use the resulting pointer to assign to any CRecordset objects m_pDatabase member variable that I use. This creates one connection to the database. My question is if I create a another thread in the application that needs to access a CRecordset object from the same database, do I need a separate CDatabase object and connection for the thread or should I use some sort of syncronization. Assigning the database to the CRecordset in the thread fails with an unhandled exception when the thread calls the Open method of the CRecordset. I am sure this is because both threads cannot access the same object, but I am new at this and learning.
Any information will be greatly appreciated.
Steven M. McNeese
[email protected]
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
|