A
Amateur
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>
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>