Click to See Complete Forum and Search --> : Too many client tasks
Sheryl M
March 17th, 2001, 12:06 AM
Hi! I am using ado data controls in my program and the error Microsoft ODBC Driver Too many client tasks appears. This error appears only in the ados. What could be the cause of this error and what can I do to solve this? Thank you and hope that you could help me.
nokiamania
September 20th, 2002, 02:49 PM
I've encountered the same problem. When I'm about to click to choose the datasource or rowsource properties of a control, the "too many client tasks" pops out. Does anyone know what is the reason behind this?
Is it because i have too many adodc controls in my project or what?
coolbiz
September 20th, 2002, 03:58 PM
So how many data controls that you guys have?
-Cool Bizs
nokiamania
September 21st, 2002, 04:30 AM
I got about 25 forms, 20 data environment and 20 data report on my project. In each form the maximum number of adodc object is only about 10.
So had i reach the maximum number of controls for the whole project? Or i have too many data environment or data report ?
coolbiz
September 21st, 2002, 11:24 AM
D*m*! That's a lot of controls man ... Can't imagine how you do even manage such application. Do you really need that many Data Controls set up? There gotta be a better way to optimize this.
I've never encountered that error before but then it is because I've never used that many data controls .... as a matter of fact ... I rarely used data control.
My advice:
1. Write a component based application. Meaning? Don't use the DATA CONTROLS. Encapsulate your data access logic into a CLASS and instantiate this class as needed.
2. If your DB supports stored procedure, then use it. This way you can have 1 connection to the DB and keep requerying the SP to get the data.
Other than that, hmmm ... I'm still amazed on how you manage that type of application.
Good Luck,
-Cool Bizs
nokiamania
September 23rd, 2002, 02:16 PM
Does it matter if i have a lot of controls in a project? I know that there is a maximum number of controls allowable by vb per form, but per project i'm not really sure. As for my application, I really need those controls because its a big project with a lot of reports and forms.
There is one time i got the source code of an application done in vb from a friend. And when i open it, it has also a lot of controls, objects, data report, etc.. but the "too many client tasks" does not appear when you are choosing the datasource. That confuses me and keeps me thinking where did i go wrong?
Any ideas or suggestions will be greatly appreciated.
coolbiz
September 23rd, 2002, 06:37 PM
I've not encountered this and therefore my experience on this is a little limited. Hopefully someone out there has been in the same situation and hopefully could give you some pointers. :(
-Cool Bizs
Twodogs
September 23rd, 2002, 10:18 PM
Have to admit that I'm with Coolbizs on this one - I try my best not to use data controls and have a data access class contained within a dll....and just re-instance it when required. In my current project, there are 195 instances of where I call the dll - and that's without including every time another class is called where I am instancing the dll.
nokiamania
September 23rd, 2002, 11:11 PM
Being a newbie to vb, its natural for me to use those data controls simply because it is easy :) Can you guys give me an idea on how to create a class and instantiate it?
For example in my application, i have a lot of data combo which is associated with an adodc object. How will I create a class similar to this control wherein i could instantiate everytime i needed it? :)
Each data report is associated with a data environment.. Is there any optimize way for me to minimize the use of data environment given i need to create many data reports in my application? Unfortunately, the database i'm using is only MSAccess, it doesn't support stored procedures, too bad i can't use it to minimize the use of ado objects.
A small project with a class for me to download will help a lot. Thanks in advance.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.