Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java & Access : Too many client tasks.

Status
Not open for further replies.

jshanoo

Programmer
Apr 2, 2002
287
IN
Hi All,
I get the following error,
it is continous mail sending application reads the access database picks email address and the text file and it sends.
it goes in loop, same i am executing 4 cities, and in 3 cities it is working fine, only one place it is giving this error. There is no problem with smtp host.
---------------------------------
DSN Error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too
many client tasks.
-----------------------
Regards
John Philip




*** Even the Best, did the Bad and Made the Best ***

John Philip
 
>>>> DSN Error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too
many client tasks.

Sounds like the number of connections you are attempting to use for Access is greater than the number of connections it allows (Or the ODBC driver you are using).

Check the number of open connections you are allowed, the number you have open, and also make sure you and your (db) are closing the connections properly. Failing that, try a decent DBMS !!
 
this application runs in loop,
i am not known to java , since i dont anything on java.
can any thing be doen on database level.
john

*** Even the Best, did the Bad and Made the Best ***

John Philip
 
As I said before -- Sounds like the number of connections you are attempting to use for Access is greater than the number of connections it allows (Or the ODBC driver you are using).

I don't know how you check the number of allowed connections for Access - try the Access forum ...
 
>>can any thing be doen on database level.

No, when working with access there is a set limit on connection, see this link for more information:

This is a design/application issue...and not a DB issue.

If this program is running in a loop...are you creating a new connection every time you enter the loop...and not closing the connection once you are done with it?

Maybe you should look into adding connection pooling...or maybe try object Pooling...check out this article for more information:

Connection Pooling

Object Pooling
 
Be sure that you do not create a new connection in each iteration of the loop.

You can reused a connection when running a new query.

Finally, make sure any opened connections tha you opened earlier were closed.

Good Luck
 
Access doesn't allow more than a few connections at a time.
Your application is exceeding that number.

Seriously consider upscaling to a real database engine as well as tracing the database connection lifecycle in your application (just in case connections aren't being properly closed).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top