Emergency! Too Busy A Connection!

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Ehsan said:
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.

Access is a single user database, it may not be able to handle multi-threads
asynchronously

John
 
Ehsan said:
Thank you William.
I know.
The idea of, say, five hundred clients trying to connect to a database would
inspire an ASP project. Although I may not know ALL the things of
programming, but i've got a couple of years of experience to know that in an
ASP project there are situations where ten thousand clients try to connect to
your site( and perhaps a lot more than that. ) In that case, you are quite
right.
Let's shade some light on things. This is a CyberCafe management program.
It's got to be able to create user accounts, add credit to them, and then
deduct credit based on the time the users are using the client computers.
500 computers trying to connect(at the same time)is the worst situation that
may happen in such a place! it is almost impossible. I know that Access CAN
handle such a thing. SQL is too big for it. Version 2 of my program, written
in Visual Basic 6.0 and using ADO could perfectly handle everything, although
it was never tested with more than 35 computers. So this one, well, it's
gotta work. There are no CyberCafes in the world that have more than 450
computers, you know! And never happens for those computers to connect to the

You obviously havn't seen the Easy Internet Cafes in London and New York
have you? :)
 
Bob said:
Is that realy you John??
Yes. I am always "John" the Baptist by birth!
Gosh. Why so harsh?

No. I was trying to give Ehsan the most honest anwser to the best of my
knowledge at first. Ehsan never mentioned that he is still doing VB 6.x and
he attempted to go into asp.net forums for help, which has nothing to do
with ASP and VB at all. At least, the fellow was not very honest upfront (to
identify his system platform).
...Or do you just think your sucking up to Bill?

Like you, I am a frequenter to help myself and hopefully I could contribute
my own once in a while (may be if I am good enough). I don't suckup to
anyboly here as you think. In fact, I know no body here and nobody here ever
gives me a penny ! You are very wrong indeed ! You must have been
so....???....

In general, I am a person with "thick skin/face". I scare of nobody but
God! If someones here are kind, I will respect them. Otherwise, I just
ignore them! In short I am not obligated to anything here...OK!
Although I agree that maybe he should have scaled it to an SQL Server, SQL
Server Express 2005, or at least MSDE, it doesn't mean there isn't a
solution.

You know, I have been encountering so many types of managers who just say
"well, VB can just do the job and so on and so on...", some of my managers
did know a little of VB and ASP and PC to be dangerous, so they decided to
do it with asscess and vb and did not realize the impact later on. I do hate
these peoples and I hope they should not make any decision about computing.
Let the true developers to make IT decision. Shoddy works always cause
headache.

I hope I explain well.

John the "Webb"
 
Back
Top