Does Ado async fetching also good for processing as well?
- From: "John Smith" <john.smith@xxxxxxxxxxx>
- Date: Fri, 23 Sep 2005 00:18:18 +0200
I'm retrieving an ado recordset in an async way (adAsyncExecute +
adAsyncFetch + adAsyncFetchNonBlocking specified in recordset.open). I'm
using visual c++.
What I do is, when I receive a FetchProgress, then I send a message to my
thread pool, where one available thread process the given chunk of the ado
recordset (based on FetchProgress data).
However what I see is that if I not protect the recordset while reading
values out of it, sometimes I got an ado exception. I assume this error
occurs because I'm trying to read from the recordset it several of my
threads, and ado also adds additional records to it at the same time.
If I move the "reading values from the recordset" into a critical section
then I don't get errors.
I assumed that ado recordset is thread-safe but it seems it's not. Or do I
screw it somewhere else?
Any help would be appreciated.
Thanks
.
- Prev by Date: Re: Server side cursors and locking
- Next by Date: Re: Server side cursors and locking
- Previous by thread: Re: Server side cursors and locking
- Next by thread: ActualSize returns -1 for Text fields
- Index(es):
Relevant Pages
|
|