G
Guest
Hi.
I have a problem with an OLEDBConnection object that is supposed to serve for
a number of clients that need data from my Access(mdb) database.
These clients are placed in different threads and try to load data from this
connection. The problem is that when the connection is retrieving data for
one of them, another one may ask for data. This throws an
InvalidOperationException with the following message:
"ExecuteReader requires an open and available connection. The connection's
current state is Open, Executing."
I fully understand its meaning, but what can I do to solve this issue?
I tried a delaying loop, checking to see if the exception occurs again in
the loop,
and repeating the operation again. Although I used Application.DoEvents (you
know what that does) , but a loop takes all the CPU time available, and it
seems to me that the whole operation becomes very very slow and surprisingly,
memory consuming!
Any one got an idea?
Thank you all.
I have a problem with an OLEDBConnection object that is supposed to serve for
a number of clients that need data from my Access(mdb) database.
These clients are placed in different threads and try to load data from this
connection. The problem is that when the connection is retrieving data for
one of them, another one may ask for data. This throws an
InvalidOperationException with the following message:
"ExecuteReader requires an open and available connection. The connection's
current state is Open, Executing."
I fully understand its meaning, but what can I do to solve this issue?
I tried a delaying loop, checking to see if the exception occurs again in
the loop,
and repeating the operation again. Although I used Application.DoEvents (you
know what that does) , but a loop takes all the CPU time available, and it
seems to me that the whole operation becomes very very slow and surprisingly,
memory consuming!
Any one got an idea?
Thank you all.