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

Strange error '800a0006' 1

Status
Not open for further replies.

Herminio

Technical User
May 10, 2002
189
PT
Everything was working just fine, and now this

"Capacity exceeded on line 40" (or something like this i'm translating from portuguese).

This is what happens, i have a page that displays the results from polls on the DB, when the poll has no votes it sould display a message like "no votes yet for this poll" but it just gives me this error here's the code.


<%
line 40 --> results1 = rsRes(&quot;resp1&quot;) / rsRes(&quot;totalvotos&quot;)
results2 = rsRes(&quot;resp2&quot;) / rsRes(&quot;totalvotos&quot;)
results3 = rsRes(&quot;resp3&quot;) / rsRes(&quot;totalvotos&quot;)

%>
<% if rsRes(&quot;totalvotos&quot;) = 0 or rsRes(&quot;totalvotos&quot;) = &quot;&quot; then %>
<FONT SIZE=&quot;&quot; COLOR=&quot;orange&quot;>Ainda não foram introduzidas respostas na votação seleccionada</FONT>
<% else %>
</div>
<table border=&quot;0&quot; align=&quot;center&quot;>
<tr>
<td colspan=&quot;4&quot;><FONT SIZE=&quot;&quot; COLOR=&quot;orange&quot;><%=rsRes(&quot;Assunto&quot;)%></FONT></td>
</tr>
<tr>
<td width=&quot;35&quot;><FONT SIZE=&quot;&quot; COLOR=&quot;orange&quot;><%=rsRes(&quot;Perg1&quot;)%>:</FONT></td>
<td width=&quot;7&quot;><img src=&quot;Imagens/amarelo.jpg&quot; width=&quot;<%=rsRes(&quot;Resp1&quot;)%>&quot; height=&quot;15&quot;></td>
<td width=&quot;20&quot;><FONT SIZE=&quot;2&quot; color=orange><%=FormatPercent(results1,1)%></FONT></td>
<td width=&quot;71&quot;><FONT SIZE=&quot;2&quot; color=orange>(<%=vtpg1%>)</FONT></td>
</tr>
<tr>
<td><FONT SIZE=&quot;&quot; COLOR=&quot;orange&quot;><%=rsRes(&quot;Perg2&quot;)%>:</FONT></td>
<td><img src=&quot;Imagens/amarelo.jpg&quot; width=&quot;<%=rsRes(&quot;Resp2&quot;)%>&quot; height=&quot;15&quot;></td>
<td><FONT SIZE=&quot;2&quot; color=orange><%= FormatPercent(results2,1)%></FONT></td>
<td><FONT SIZE=&quot;2&quot; color=orange>(<%=vtpg2%>)</FONT></td>
</tr>
<tr>
<td><FONT SIZE=&quot;&quot; COLOR=&quot;orange&quot;><%=rsRes(&quot;Perg3&quot;)%>:</FONT></td>
<td><img src=&quot;Imagens/amarelo.jpg&quot; width=&quot;<%=rsRes(&quot;Resp3&quot;)%>&quot; height=&quot;15&quot;></td>
<td><FONT SIZE=&quot;2&quot; color=orange><%=FormatPercent(results3,1)%></FONT></td>
<td><FONT SIZE=&quot;2&quot; color=orange>(<%=vtpg3%>)</FONT></td>
</tr>
<tr>
<td colspan=&quot;4&quot;><FONT SIZE=&quot;&quot; COLOR=&quot;orange&quot;>Participa&ccedil;&otilde;es: <%=rsRes(&quot;Totalvotos&quot;)%></FONT></td>
</tr>
</table>
<% end if %>
 
i've missed some lines on the top

<%
vtpg1 = rsRes(&quot;resp1&quot;)
vtpg2 = rsRes(&quot;resp2&quot;)
vtpg3 = rsRes(&quot;resp3&quot;)
results1 = rsRes(&quot;resp1&quot;) / rsRes(&quot;totalvotos&quot;)
results2 = rsRes(&quot;resp2&quot;) / rsRes(&quot;totalvotos&quot;)
results3 = rsRes(&quot;resp3&quot;) / rsRes(&quot;totalvotos&quot;)

%>
 
COuld you supply some sample numbers? It's possible that this is a variable type issue...well, it could be :p

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
This happens only when rsNews(&quot;totalvotos&quot;) = 0 and rsNews(&quot;resp1,2,3&quot;) = 0, if there are values diferent from 0 it works just fine
 
How about a division by zero error? :)

You'll need to double check that rsRes(&quot;totalVotos&quot;) is greater than 0 before doing any math...

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
that's it Tarwn, i made some condition before the math and now it works fine.

Thanks once again Tarwn

Herminio, Portugal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top