Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Error too many tasks


Message #1 by "damian lynch" <damian.lynch@o...> on Thu, 5 Sep 2002 13:45:01
I keep getting this error even though I am closing all recordsets and 
setting them to nothing at end of each.

Question, Is there a limit to the number of recordsets you can include in 
a page.I'm using access, asp on an NT Server.
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' 

[Microsoft][ODBC Microsoft Access Driver] Too many client tasks. 

/departments/hr/pmds/climate_survey/Focus2/cat1/resultsfocus2_cat1_null.asp
, line 81 

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/ConnClimateSurvey.asp" -->

<!--#include file="resultsfocus2_cat1_avs.asp" -->
<!--#include file="resultsfocus2_cat1_as.asp" -->
<!--#include file="resultsfocus2_cat1_a.asp" -->
<!--#include file="resultsfocus2_cat1_d.asp" -->
<!--#include file="resultsfocus2_cat1_ds.asp" -->
<!--#include file="resultsfocus2_cat1_dvs.asp" -->
<!--#include file="resultsfocus2_cat1_null.asp" -->
<%
Cat1total= Cat1a + Cat1as + Cat1avs + Cat1d + Cat1ds + Cat1dvs + Cat1null
%>

<table width="1000" border="0" cellspacing="0" cellpadding="0" 
bordercolor="#165090">
  <tr> 
    <td width="41"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Cat.</font></b></td>
    <td width="124"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Agree 
      Very Strongly</font></b></td>
    <td width="103"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Agree 
      Strongly</font></b></td>
    <td width="81"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Agree</font></b></td>
    <td width="100"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Disagree</font></b></td>
    <td width="136"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Disagree 
      Strongly</font></b></td>
    <td width="158"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Disagree 
      Very Strongly</font></b></td>
    <td width="68"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Replies</font></b></td>
    <td width="189"><b><font color="#165090" face="Verdana, Arial, 
Helvetica, sans-serif">Void 
      </font></b></td>
  </tr>
  <tr> 
    <td width="41">1</td>
    <td width="124"><%= Round(Cat1a/Cat1total,3) * 100%>%</td>
    <td width="103"><%= Round(Cat1as/Cat1total,3) * 100%>%</td>
    <td width="81"><%= Round(Cat1avs/Cat1total,3) * 100%>%</td>
    <td width="100"><%= Round(Cat1d/Cat1total,3) * 100%>%</td>
    <td width="136"><%= Round(Cat1ds/Cat1total,3) * 100%>%</td>
    <td width="158"><%= Round(Cat1dvs/Cat1total,3) * 100%>%</td>
    <td width="68"><%= Cat1total%></td>
    <td width="189"><%= Round(Cat1null/Cat1total,3) * 100%>%</td>
  </tr>
</table>

The include files all look like this with the recordsets having the same 
file naming convention as the file names used in the server side includes. 
I know if I remove last server side include it works fine.


<%
set rsFocus2_Cat1_null_q1 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q1.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q1.Source = "SELECT Q1  FROM Climate_Survey  WHERE Q1 
LIKE '%NULL1%'"
rsFocus2_Cat1_null_q1.CursorType = 0
rsFocus2_Cat1_null_q1.CursorLocation = 2
rsFocus2_Cat1_null_q1.LockType = 3
rsFocus2_Cat1_null_q1.Open()
rsFocus2_Cat1_null_q1_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q1.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q1.MoveNext
wend 
set rsFocus2_Cat1_null_q1 = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q10a = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q10a.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q10a.Source = "SELECT Q10a  FROM Climate_Survey  WHERE 
Q10a LIKE '%NULL1%'"
rsFocus2_Cat1_null_q10a.CursorType = 0
rsFocus2_Cat1_null_q10a.CursorLocation = 2
rsFocus2_Cat1_null_q10a.LockType = 3
rsFocus2_Cat1_null_q10a.Open()
rsFocus2_Cat1_null_q10a_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q10a.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q10a.MoveNext
wend 
set rsFocus2_Cat1_null_q10a = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q10b = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q10b.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q10b.Source = "SELECT Q10b  FROM Climate_Survey  WHERE 
Q10b LIKE '%NULL1%'"
rsFocus2_Cat1_null_q10b.CursorType = 0
rsFocus2_Cat1_null_q10b.CursorLocation = 2
rsFocus2_Cat1_null_q10b.LockType = 3
rsFocus2_Cat1_null_q10b.Open()
rsFocus2_Cat1_null_q10b_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q10b.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q10b.MoveNext
wend 
set rsFocus2_Cat1_null_q10b = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q10c = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q10c.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q10c.Source = "SELECT Q10c  FROM Climate_Survey  WHERE 
Q10c LIKE '%NULL1%'"
rsFocus2_Cat1_null_q10c.CursorType = 0
rsFocus2_Cat1_null_q10c.CursorLocation = 2
rsFocus2_Cat1_null_q10c.LockType = 3
rsFocus2_Cat1_null_q10c.Open()
rsFocus2_Cat1_null_q10c_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q10c.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q10c.MoveNext
wend 
set rsFocus2_Cat1_null_q10c = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q16 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q16.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q16.Source = "SELECT Q16  FROM Climate_Survey  WHERE 
Q16 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q16.CursorType = 0
rsFocus2_Cat1_null_q16.CursorLocation = 2
rsFocus2_Cat1_null_q16.LockType = 3
rsFocus2_Cat1_null_q16.Open()
rsFocus2_Cat1_null_q16_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q16.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q16.MoveNext
wend 
set rsFocus2_Cat1_null_q16 = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q20 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q20.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q20.Source = "SELECT Q20  FROM Climate_Survey  WHERE 
Q20 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q20.CursorType = 0
rsFocus2_Cat1_null_q20.CursorLocation = 2
rsFocus2_Cat1_null_q20.LockType = 3
rsFocus2_Cat1_null_q20.Open()
rsFocus2_Cat1_null_q20_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q20.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q20.MoveNext
wend 
set rsFocus2_Cat1_null_q20 = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q27 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q27.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q27.Source = "SELECT Q27  FROM Climate_Survey  WHERE 
Q27 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q27.CursorType = 0
rsFocus2_Cat1_null_q27.CursorLocation = 2
rsFocus2_Cat1_null_q27.LockType = 3
rsFocus2_Cat1_null_q27.Open()
rsFocus2_Cat1_null_q27_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q27.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q27.MoveNext
wend 
set rsFocus2_Cat1_null_q10c = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q31 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q31.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q31.Source = "SELECT Q31  FROM Climate_Survey  WHERE 
Q31 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q31.CursorType = 0
rsFocus2_Cat1_null_q31.CursorLocation = 2
rsFocus2_Cat1_null_q31.LockType = 3
rsFocus2_Cat1_null_q31.Open()
rsFocus2_Cat1_null_q31_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q31.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q31.MoveNext
wend 
set rsFocus2_Cat1_null_q31 = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q36 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q36.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q36.Source = "SELECT Q36  FROM Climate_Survey  WHERE 
Q36 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q36.CursorType = 0
rsFocus2_Cat1_null_q36.CursorLocation = 2
rsFocus2_Cat1_null_q36.LockType = 3
rsFocus2_Cat1_null_q36.Open()
rsFocus2_Cat1_null_q36_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q36.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q36.MoveNext
wend 
set rsFocus2_Cat1_null_q36 = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q41 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q41.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q41.Source = "SELECT Q41  FROM Climate_Survey  WHERE 
Q41 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q41.CursorType = 0
rsFocus2_Cat1_null_q41.CursorLocation = 2
rsFocus2_Cat1_null_q41.LockType = 3
rsFocus2_Cat1_null_q41.Open()
rsFocus2_Cat1_null_q41_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q41.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q41.MoveNext
wend 
set rsFocus2_Cat1_null_q41 = nothing
%>
<%
Cat1null = Cat1null + totalnull
%>
<%
set rsFocus2_Cat1_null_q65 = Server.CreateObject("ADODB.Recordset")
rsFocus2_Cat1_null_q65.ActiveConnection = MM_ConnClimateSurvey_STRING
rsFocus2_Cat1_null_q65.Source = "SELECT Q65  FROM Climate_Survey  WHERE 
Q65 LIKE '%NULL1%'"
rsFocus2_Cat1_null_q65.CursorType = 0
rsFocus2_Cat1_null_q65.CursorLocation = 2
rsFocus2_Cat1_null_q65.LockType = 3
rsFocus2_Cat1_null_q65.Open()
rsFocus2_Cat1_null_q65_numRows = 0
totalnull = 0
while NOT rsFocus2_Cat1_null_q65.EOF
totalnull = totalnull + 1
rsFocus2_Cat1_null_q65.MoveNext
wend 
set rsFocus2_Cat1_null_q65 = nothing
%>

<%
Cat1null = Cat1null + totalnull
%>
<%
rsFocus2_Cat1_null_q1.Close()
%>
<%
rsFocus2_Cat1_null_q10a.Close()
%>
<%
rsFocus2_Cat1_null_q10b.Close()
%>
<%
rsFocus2_Cat1_null_q10c.Close()
%>
<%
rsFocus2_Cat1_null_q16.Close()
%>
<%
rsFocus2_Cat1_null_q27.Close()
%>
<%
rsFocus2_Cat1_null_q20.Close()
%>
<%
rsFocus2_Cat1_null_q31.Close()
%>
<%
rsFocus2_Cat1_null_q36.Close()
%>
<%
rsFocus2_Cat1_null_q41.Close()
%>
<%
rsFocus2_Cat1_null_q65.Close()
%>


Message #2 by "Daniel Groh" <daniel.groh@s...> on Thu, 5 Sep 2002 09:47:42 -0300
I think so...probably...

try to close the recordset after you using it and not in the end of your
page, got it?

and say Bye to Ultradev... ;)

Hugs

----- Original Message -----
From: damian lynch <damian.lynch@o...>
To: Access ASP <access_asp@p...>
Sent: Thursday, September 05, 2002 1:45 PM
Subject: [access_asp] Error too many tasks


> I keep getting this error even though I am closing all recordsets and
> setting them to nothing at end of each.
>
> Question, Is there a limit to the number of recordsets you can include in
> a page.I'm using access, asp on an NT Server.
> Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
>
> [Microsoft][ODBC Microsoft Access Driver] Too many client tasks.
>
>
/departments/hr/pmds/climate_survey/Focus2/cat1/resultsfocus2_cat1_null.asp
> , line 81
>
> <%@LANGUAGE="VBSCRIPT"%>
> <!--#include file="../../Connections/ConnClimateSurvey.asp" -->
>
> <!--#include file="resultsfocus2_cat1_avs.asp" -->
> <!--#include file="resultsfocus2_cat1_as.asp" -->
> <!--#include file="resultsfocus2_cat1_a.asp" -->
> <!--#include file="resultsfocus2_cat1_d.asp" -->
> <!--#include file="resultsfocus2_cat1_ds.asp" -->
> <!--#include file="resultsfocus2_cat1_dvs.asp" -->
> <!--#include file="resultsfocus2_cat1_null.asp" -->
> <%
> Cat1total= Cat1a + Cat1as + Cat1avs + Cat1d + Cat1ds + Cat1dvs + Cat1null
> %>
>
> <table width="1000" border="0" cellspacing="0" cellpadding="0"
> bordercolor="#165090">
>   <tr>
>     <td width="41"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Cat.</font></b></td>
>     <td width="124"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Agree
>       Very Strongly</font></b></td>
>     <td width="103"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Agree
>       Strongly</font></b></td>
>     <td width="81"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Agree</font></b></td>
>     <td width="100"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Disagree</font></b></td>
>     <td width="136"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Disagree
>       Strongly</font></b></td>
>     <td width="158"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Disagree
>       Very Strongly</font></b></td>
>     <td width="68"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Replies</font></b></td>
>     <td width="189"><b><font color="#165090" face="Verdana, Arial,
> Helvetica, sans-serif">Void
>       </font></b></td>
>   </tr>
>   <tr>
>     <td width="41">1</td>
>     <td width="124"><%= Round(Cat1a/Cat1total,3) * 100%>%</td>
>     <td width="103"><%= Round(Cat1as/Cat1total,3) * 100%>%</td>
>     <td width="81"><%= Round(Cat1avs/Cat1total,3) * 100%>%</td>
>     <td width="100"><%= Round(Cat1d/Cat1total,3) * 100%>%</td>
>     <td width="136"><%= Round(Cat1ds/Cat1total,3) * 100%>%</td>
>     <td width="158"><%= Round(Cat1dvs/Cat1total,3) * 100%>%</td>
>     <td width="68"><%= Cat1total%></td>
>     <td width="189"><%= Round(Cat1null/Cat1total,3) * 100%>%</td>
>   </tr>
> </table>
>
> The include files all look like this with the recordsets having the same
> file naming convention as the file names used in the server side includes.
> I know if I remove last server side include it works fine.
>
>
> <%
> set rsFocus2_Cat1_null_q1 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q1.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q1.Source = "SELECT Q1  FROM Climate_Survey  WHERE Q1
> LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q1.CursorType = 0
> rsFocus2_Cat1_null_q1.CursorLocation = 2
> rsFocus2_Cat1_null_q1.LockType = 3
> rsFocus2_Cat1_null_q1.Open()
> rsFocus2_Cat1_null_q1_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q1.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q1.MoveNext
> wend
> set rsFocus2_Cat1_null_q1 = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q10a = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q10a.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q10a.Source = "SELECT Q10a  FROM Climate_Survey  WHERE
> Q10a LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q10a.CursorType = 0
> rsFocus2_Cat1_null_q10a.CursorLocation = 2
> rsFocus2_Cat1_null_q10a.LockType = 3
> rsFocus2_Cat1_null_q10a.Open()
> rsFocus2_Cat1_null_q10a_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q10a.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q10a.MoveNext
> wend
> set rsFocus2_Cat1_null_q10a = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q10b = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q10b.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q10b.Source = "SELECT Q10b  FROM Climate_Survey  WHERE
> Q10b LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q10b.CursorType = 0
> rsFocus2_Cat1_null_q10b.CursorLocation = 2
> rsFocus2_Cat1_null_q10b.LockType = 3
> rsFocus2_Cat1_null_q10b.Open()
> rsFocus2_Cat1_null_q10b_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q10b.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q10b.MoveNext
> wend
> set rsFocus2_Cat1_null_q10b = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q10c = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q10c.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q10c.Source = "SELECT Q10c  FROM Climate_Survey  WHERE
> Q10c LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q10c.CursorType = 0
> rsFocus2_Cat1_null_q10c.CursorLocation = 2
> rsFocus2_Cat1_null_q10c.LockType = 3
> rsFocus2_Cat1_null_q10c.Open()
> rsFocus2_Cat1_null_q10c_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q10c.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q10c.MoveNext
> wend
> set rsFocus2_Cat1_null_q10c = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q16 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q16.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q16.Source = "SELECT Q16  FROM Climate_Survey  WHERE
> Q16 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q16.CursorType = 0
> rsFocus2_Cat1_null_q16.CursorLocation = 2
> rsFocus2_Cat1_null_q16.LockType = 3
> rsFocus2_Cat1_null_q16.Open()
> rsFocus2_Cat1_null_q16_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q16.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q16.MoveNext
> wend
> set rsFocus2_Cat1_null_q16 = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q20 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q20.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q20.Source = "SELECT Q20  FROM Climate_Survey  WHERE
> Q20 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q20.CursorType = 0
> rsFocus2_Cat1_null_q20.CursorLocation = 2
> rsFocus2_Cat1_null_q20.LockType = 3
> rsFocus2_Cat1_null_q20.Open()
> rsFocus2_Cat1_null_q20_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q20.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q20.MoveNext
> wend
> set rsFocus2_Cat1_null_q20 = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q27 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q27.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q27.Source = "SELECT Q27  FROM Climate_Survey  WHERE
> Q27 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q27.CursorType = 0
> rsFocus2_Cat1_null_q27.CursorLocation = 2
> rsFocus2_Cat1_null_q27.LockType = 3
> rsFocus2_Cat1_null_q27.Open()
> rsFocus2_Cat1_null_q27_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q27.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q27.MoveNext
> wend
> set rsFocus2_Cat1_null_q10c = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q31 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q31.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q31.Source = "SELECT Q31  FROM Climate_Survey  WHERE
> Q31 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q31.CursorType = 0
> rsFocus2_Cat1_null_q31.CursorLocation = 2
> rsFocus2_Cat1_null_q31.LockType = 3
> rsFocus2_Cat1_null_q31.Open()
> rsFocus2_Cat1_null_q31_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q31.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q31.MoveNext
> wend
> set rsFocus2_Cat1_null_q31 = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q36 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q36.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q36.Source = "SELECT Q36  FROM Climate_Survey  WHERE
> Q36 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q36.CursorType = 0
> rsFocus2_Cat1_null_q36.CursorLocation = 2
> rsFocus2_Cat1_null_q36.LockType = 3
> rsFocus2_Cat1_null_q36.Open()
> rsFocus2_Cat1_null_q36_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q36.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q36.MoveNext
> wend
> set rsFocus2_Cat1_null_q36 = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q41 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q41.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q41.Source = "SELECT Q41  FROM Climate_Survey  WHERE
> Q41 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q41.CursorType = 0
> rsFocus2_Cat1_null_q41.CursorLocation = 2
> rsFocus2_Cat1_null_q41.LockType = 3
> rsFocus2_Cat1_null_q41.Open()
> rsFocus2_Cat1_null_q41_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q41.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q41.MoveNext
> wend
> set rsFocus2_Cat1_null_q41 = nothing
> %>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> set rsFocus2_Cat1_null_q65 = Server.CreateObject("ADODB.Recordset")
> rsFocus2_Cat1_null_q65.ActiveConnection = MM_ConnClimateSurvey_STRING
> rsFocus2_Cat1_null_q65.Source = "SELECT Q65  FROM Climate_Survey  WHERE
> Q65 LIKE '%NULL1%'"
> rsFocus2_Cat1_null_q65.CursorType = 0
> rsFocus2_Cat1_null_q65.CursorLocation = 2
> rsFocus2_Cat1_null_q65.LockType = 3
> rsFocus2_Cat1_null_q65.Open()
> rsFocus2_Cat1_null_q65_numRows = 0
> totalnull = 0
> while NOT rsFocus2_Cat1_null_q65.EOF
> totalnull = totalnull + 1
> rsFocus2_Cat1_null_q65.MoveNext
> wend
> set rsFocus2_Cat1_null_q65 = nothing
> %>
>
> <%
> Cat1null = Cat1null + totalnull
> %>
> <%
> rsFocus2_Cat1_null_q1.Close()
> %>
> <%
> rsFocus2_Cat1_null_q10a.Close()
> %>
> <%
> rsFocus2_Cat1_null_q10b.Close()
> %>
> <%
> rsFocus2_Cat1_null_q10c.Close()
> %>
> <%
> rsFocus2_Cat1_null_q16.Close()
> %>
> <%
> rsFocus2_Cat1_null_q27.Close()
> %>
> <%
> rsFocus2_Cat1_null_q20.Close()
> %>
> <%
> rsFocus2_Cat1_null_q31.Close()
> %>
> <%
> rsFocus2_Cat1_null_q36.Close()
> %>
> <%
> rsFocus2_Cat1_null_q41.Close()
> %>
> <%
> rsFocus2_Cat1_null_q65.Close()
> %>
>
>
>

Message #3 by "Ken Schaefer" <ken@a...> on Fri, 6 Sep 2002 10:09:42 +1000
This has got to be the *worst* way that you could get the number of records
in a recordset:

: while NOT rsFocus2_Cat1_null_q41.EOF
:     totalnull = totalnull + 1
:     rsFocus2_Cat1_null_q41.MoveNext
: wend

Consider the alternatives here:
http://www.adopenstatic.com/FAQ/recordcountalternatives.asp

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "damian lynch" <damian.lynch@o...>
Subject: [access_asp] Error too many tasks


: I keep getting this error even though I am closing all recordsets and
: setting them to nothing at end of each.
:
: Question, Is there a limit to the number of recordsets you can include in
: a page.I'm using access, asp on an NT Server.
: Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
:
: [Microsoft][ODBC Microsoft Access Driver] Too many client tasks.
:
:
/departments/hr/pmds/climate_survey/Focus2/cat1/resultsfocus2_cat1_null.asp
: , line 81

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #4 by "damian lynch" <damian.lynch@o...> on Fri, 6 Sep 2002 12:29:57
> This has got to be the *worst* way that you could get the number of 
records
in a recordset:

: while NOT rsFocus2_Cat1_null_q41.EOF
:     totalnull = totalnull + 1
:     rsFocus2_Cat1_null_q41.MoveNext
: wend

Consider the alternatives here:
http://www.adopenstatic.com/FAQ/recordcountalternatives.asp

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thanks, was not aware of the count function, I've found that after 60 or 
so queries it crashes.


  Return to Index