ASP page doesn't open

G

Guest

Dear Sirs
I have an ASP page to show data on the web.
As long as I would like to show data from +/- 5 different records in a
table, I do not have any problem and my page is running OK. As soon as I
would like to show +/- 40 different records in my table the page doesn't
open. I'll attach the code and maybe someone can tell me why it works with
less records but not with all.

<form method="GET" action="1form.asp" name="webcontractmargins"
onSubmit="return Checkform(this);">
<table border="0" cellpadding="0" cellspacing="0" class="formpagetable"
width="303" style="border-width: 0">
<tr>
<td colspan="2">
<table width="552" border="0">
<tr>

<td align="left" valign="top" height="14" width="548"><img border="0"
src="http://www.bellfield-barna.com/BIE/images/c1_top.GIF" width="547"
height="14"></td>
</tr>

</tr>
</table>
</td>
<table border="0" width="554" height="40">

<tr>
<td align="right" valign="top" class="formpagetablelabel"
width="100"><b>Mercancía</b></td>
<td align="right" valign="top" class="formpagetablelabel"
width="70"><b>Mes</b></td>
<td align="center" valign="top" class="formpagetablelabel"
width="65"><b>Tamaño </b></td>
<td align="center" valign="top" class="formpagetablelabel"
width="106"><b>Inicial</b></td>
<td align="left" valign="top" class="formpagetablelabel" width="86">
<p align="center"><b>Mantenimiento</b></td>
</tr>
<%
Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

SqlStr ="SELECT * FROM webcontractmargins ORDER BY commodity"

Set rsTable = conntemp.Execute(SqlStr)

' Cycle through the recordset, building a table row from each record.
While not rsTable.EOF
%>
<tr>
<td width="54"><input class="formpagetablefield" type="text"
style="text-align: left;" name="commodity" size="30"
Value="<%=trim(rsTable("commodity"))%>"></td>
<td width="15"><input class="formpagetablefield" type="text"
style="text-align: center;" name="mes" size="22"
Value="<%=trim(rsTable("months"))%>"></td>
<td width="65">
<p align="center"><input class="formpagetablefield" type="text"
style="text-align: center;" name="deliverysize" size="8"
Value="<%=trim(rsTable("deliverysize"))%>"></td>
<style type="text/css">
<!--
..pos {
font-family: Tahoma; font-size: 8pt;
color: #0000FF;
text-align:right;
}
..neg {
font-family: Tahoma; font-size: 8pt;
color: #0000FF;
text-align:right;
}
-->
</style>
<%
If CSng(rsTable("initialmargin")) < 0 Then
textboxclass = "neg"
Else
textboxclass = "pos"
End If
%>

<td width="106">
<p align="center"><input class="<%=textboxclass%>" type="number"
name="initialmargin" size="7"
Value="<%=formatnumber(rsTable("initialmargin"),2,-1,-1,-1)%>" style="float:
right"><span style="font-size: 8pt">US$</span></td>
<style type="text/css">
<!--
..pos {
font-family: Tahoma; font-size: 8pt;
text-align:right;
color: #0000FF;
}
..neg {
font-family: Tahoma; font-size: 8pt;
text-align:right;
color: #0000FF;
}
-->
</style>
<%
If CSng(rsTable("maintenancemargin")) < 0 Then
textboxclass = "neg"
Else
textboxclass = "pos"
End If
%>

<td width="86">
<p align="center"><input class="<%=textboxclass%>" type="number"
name="maintenancemargin" size="7"
Value="<%=formatNumber(rsTable("maintenancemargin"),2,-1,-1,-1)%>"
style="float: left"><span style="font-size: 8pt">US$</div></span></td>
</tr>

<%
rsTable.movenext
Wend
' Close recordset
rsTable.Close
Set rsTable = Nothing

' Close connection
conntemp.Close
Set conntemp = Nothing
%>

</table>
</form>


</tr>
 
M

Mark Fitzpatrick

Is there a definite number that it dies at? The code looks fine actually.
The ASP loop is very simple and straightforward and looks correct. A couple
things, there are a some items in there that are getting repeated each loop.
For example, you don't need to define the CSS classes each time you go
through the loop. You should put those in the document header as all they're
doing is severely bloating the HTML. The place that the CSS code is in could
actually be causing the table to appear incorrectly, but probably not. What
you may find instead is that there is something actually in one of the form
fields that is causing an error in the display. Try showing more records to
create the problem. You may want to increment it slowly until you get to the
point where adding one more record to display causes it not to show. Then
you can figure out which record could be causing the error.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top