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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Too many client tasks' error

Status
Not open for further replies.

msteggo

Programmer
Oct 27, 2000
52
US
HELP!
I am getting a 'Too many client tasks' on a page that has this asp script:
Code:
<%
' This script loads data from database into application variables 
'    and displays current zone.

' Connect to database
Set con=Server.CreateObject(&quot;ADODB.Connection&quot;)
con.ConnectionTimeout=40

' Open database
con.Open &quot;DSN=zoneDb&quot;

Dim currentTable
Dim curr

' Retrieve current ID
Set recordSet=Server.CreateObject(&quot;ADODB.Recordset&quot;)
recordSet.Open &quot;SELECT * FROM ZoneTbl WHERE TEMP_ID=0&quot;,con
Application(&quot;curr_id&quot;) = recordSet(&quot;CURR_ID&quot;)
Application(&quot;curr_id&quot;) = 8
' Build current table name based on curr_id
currentTable = &quot;temp&quot; & Application(&quot;curr_id&quot;) & &quot;DataTbl&quot;

' Connect with current data table
Set recordSet1=Server.CreateObject(&quot;ADODB.Recordset&quot;)
recordSet1.Open &quot;SELECT * FROM &quot; & currentTable & &quot;&quot;,con

' Load all data of current data table
Do While not recordSet1.EOF
	Application(recordSet1(&quot;DATA_TYPE&quot;)) = recordSet1(&quot;DATA&quot;)
	recordSet1.MoveNext
Loop

'Close database
con.Close
Set con=Nothing

' Display current zone
Server.Execute(&quot;tier2/display_curr&quot; & Application(&quot;curr_id&quot;) & &quot;.asp&quot;)
%>
I have traced the problem to the con.Open &quot;&quot; line...any suggestions?
 
Check your zoneDB DSN in ODBC Data Sources. Check if you can connect to your database from some other tool like Visual Interdev or Access.

Also you are using the Application variables in a very strange and very bad way. Why can't you just use common variables?


 
Thanks,
I'll look into it...thought it was a server issue...

As far as my choice of variable handling, I use Application variables in order to access these data values across multiple pages...I need temporary data binding, so I have to use these global variables...unless common variables can extend beyond page scope. Do they? I don't know...If they do, I would be happy to use them. I do not want to resort to data transfer via forms. Also, I know that only one person will use this application, period, so any locking of these app vars are unnecessary. Please let me know of a better way if you have one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top