DAO 3.5 and multithreading --yes or no? 
Author Message
 DAO 3.5 and multithreading --yes or no?

Hi,

Q.      Does anyone know the CURRENT status of multithreading using DAO
(dbDAO) (3.5)?
Q.      Can dbDAO be used in a separate thread within an Access database?
i.e., an Access form using a dll which uses dbDAO (for background
processing)?
Q.      Can MICROSOFT clarify the situation regarding (see below for
references):
        Is DAO 3.5 now threadsafe?  Is Jet still NOT thread safe?
Q.      If  DAO 3.5 is now threadsafe but Jet is still NOT thread safe, does
this mean that a single process CAN multithread using DAO but an Access
97 process cannot?

MSKB Q151407 regarding DAO 3.0 states:
"
Do not use MFC DAO or the DAO SDK dbDao classes in any thread but the
primary thread of an application.
"  ? --
and also says:
"
MORE INFORMATION
Internally, the Jet engine is multithreaded, and the registry setting
... controls the number of threads that the engine uses internally.
--->>>> THE JET ENGINE IS MULTITHREADED INTERNALLY,
--->>>> BUT NEITHER DAO NOR THE JET ENGINE ARE THREAD- SAFE.
"

-- as CONTRASTED WITH online documentation for DAO 3.5 which says in the
article:
"
DAO and the Apartment-threading Model
--->>>> DAO 3.5 CAN BE USED IN SEVERAL THREADS OF A MULTI-TASKING
APPLICATION
 to accomplish many tasks simultaneously. For example, a long running
query may be performed by one thread, while the contents of a large
recordset may be displayed by another thread.

This is possible because DAO 3.5 is an inproc (DLL-based) server which
supports the OLE Apartment-threading Model. The Apartment-threading
Model defines one way interface calls are made to an OLE object and how
interface pointers are passed between threads.
"

NOTES:
1.      Many people in the microsoft.public.vc.database newsgroup over time
seem to imply that multi threading does not work.
2.      DAO 3.5 sdk contains:
        DAO SDK Files -- MultThrd: Demonstrates multi-threading support in DAO.

I welcome newsgroup and/or direct responses on all (technical) levels.

Thanks in advance,
Steve Barbash

REFERENCES:
----------------------
1.
Microsoft Knowledge Base
PRB: DAO 3.0 Must Be Used In Primary Thread
Last reviewed: July 31, 1997
Article ID: Q151407 The information in this article applies to:
        ?The Microsoft Foundation Classes (MFC) included with: -      Microsoft
Visual C++, 32-bit Edition, versions 4.0, 4.1, 4.2
...
"RESOLUTION
Do not use MFC DAO or the DAO SDK dbDao classes in any thread but the
primary thread of an application."

2.
online documentation for DAO 3.5 article: "DAO and the
Apartment-threading Model"



Tue, 17 Oct 2000 03:00:00 GMT  
 DAO 3.5 and multithreading --yes or no?

Shalom,

No, no, no, no....

The fact that DAO internally uses multithreading, is just another way of
saying "Ummm.. It's better now..".. It DOES not mean u may use it in a
multi-threaded environment...

--
Shahar Prish
Balisoft Technologies : http://www.balisoft.com

Quote:

>Hi,

>Q. Does anyone know the CURRENT status of multithreading using DAO
>(dbDAO) (3.5)?
>Q. Can dbDAO be used in a separate thread within an Access database?
>i.e., an Access form using a dll which uses dbDAO (for background
>processing)?
>Q. Can MICROSOFT clarify the situation regarding (see below for
>references):
> Is DAO 3.5 now threadsafe?  Is Jet still NOT thread safe?
>Q. If  DAO 3.5 is now threadsafe but Jet is still NOT thread safe, does
>this mean that a single process CAN multithread using DAO but an Access
>97 process cannot?

>MSKB Q151407 regarding DAO 3.0 states:
>"
>Do not use MFC DAO or the DAO SDK dbDao classes in any thread but the
>primary thread of an application.
>"  ? --
>and also says:
>"
>MORE INFORMATION
>Internally, the Jet engine is multithreaded, and the registry setting
>... controls the number of threads that the engine uses internally.
>--->>>> THE JET ENGINE IS MULTITHREADED INTERNALLY,
>--->>>> BUT NEITHER DAO NOR THE JET ENGINE ARE THREAD- SAFE.
>"

>-- as CONTRASTED WITH online documentation for DAO 3.5 which says in the
>article:
>"
>DAO and the Apartment-threading Model
>--->>>> DAO 3.5 CAN BE USED IN SEVERAL THREADS OF A MULTI-TASKING
>APPLICATION
> to accomplish many tasks simultaneously. For example, a long running
>query may be performed by one thread, while the contents of a large
>recordset may be displayed by another thread.

>This is possible because DAO 3.5 is an inproc (DLL-based) server which
>supports the OLE Apartment-threading Model. The Apartment-threading
>Model defines one way interface calls are made to an OLE object and how
>interface pointers are passed between threads.
>"

>NOTES:
>1. Many people in the microsoft.public.vc.database newsgroup over time
>seem to imply that multi threading does not work.
>2. DAO 3.5 sdk contains:
> DAO SDK Files -- MultThrd: Demonstrates multi-threading support in DAO.

>I welcome newsgroup and/or direct responses on all (technical) levels.

>Thanks in advance,
>Steve Barbash

>REFERENCES:
>----------------------
>1.
>Microsoft Knowledge Base
>PRB: DAO 3.0 Must Be Used In Primary Thread
>Last reviewed: July 31, 1997
>Article ID: Q151407 The information in this article applies to:
> ?The Microsoft Foundation Classes (MFC) included with: - Microsoft
>Visual C++, 32-bit Edition, versions 4.0, 4.1, 4.2
>...
>"RESOLUTION
>Do not use MFC DAO or the DAO SDK dbDao classes in any thread but the
>primary thread of an application."

>2.
>online documentation for DAO 3.5 article: "DAO and the
>Apartment-threading Model"



Thu, 19 Oct 2000 03:00:00 GMT  
 DAO 3.5 and multithreading --yes or no?

Quote:

> Hi,

> Q.      Does anyone know the CURRENT status of multithreading using
> DAO
> (dbDAO) (3.5)?
> Q.      Can dbDAO be used in a separate thread within an Access
> database?
> i.e., an Access form using a dll which uses dbDAO (for background
> processing)?
> Q.      Can MICROSOFT clarify the situation regarding (see below for
> references):
>         Is DAO 3.5 now threadsafe?  Is Jet still NOT thread safe?
> Q.      If  DAO 3.5 is now threadsafe but Jet is still NOT thread
> safe, does
> this mean that a single process CAN multithread using DAO but an
> Access
> 97 process cannot?

See Q169395 "Thread Safety for DAO/Jet 3.5"

Jet 3.5 is NOT thread-safe.
The UNICODE version (only) of DAO 3.5 IS thread-safe because it opens a
separate instance of Jet for each thread.

Seth Jones



Sun, 22 Oct 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Moving from DAO 3.5 to DAO 3.6

2. DAO 3.5 & DAO 3.51 work differently

3. Convert DAO 3.5 to DAO 3.6 Jet Engine 4.0

4. DAO 3.5 vs DAO 3.51

5. DAO 3.5 object library vs. DAO 3.51

6. DAO 3.6 vs DAO 3.5 (VB6.0 sp3)

7. VB4 is DAO 3.5 safe, or DAO 3.0 better

8. VB4 is DAO 3.5 safe, or DAO 3.0 better

9. DAO 3.0 vs DAo 3.5

10. Upgrade from DAO 3.5 to DAO 3.6

11. DAO 3.6 and DAO 3.5

12. DAO 3.5 Problem with query parameters

 

 
Powered by phpBB® Forum Software