Hi list,
Need to know how to customize the below code, so, that it can be faster a bit..
1) If i run this code, it takes about 18/19 seconds to load the page.
2) And If i eliminate the Query2 (from 'start of Query2' to 'End of Query2') inside the Query Loop, it takes about 7/8 seconds..
Any suggestions please..
Dim count_1
count_1=0
Query = "select p_code, product_name, pm, substance, width_mm, from fg_lcb order by no desc"
Set RS=Conn.Execute(Query)
Do while Not RS.EOF
product_code = RS1("product_code"
%><tr bgcolor=#eeeeee>
<td><input type=checkbox name=sel_value value="<%=p_code%></td>
<td><font size=2><%=product_code%></font></td>
<td><select name="serial<%=count_1%>"><%
'Start of Query2
Query2 = "select serial_no,from_location,qty,weight,quality,remark from fg_lcb where product_code='"&product_code&"' order by no desc limit 2"
Set RS2=Conn.Execute(Query2)
Do while Not RS2.EOF %>
<option value="<%=RS2("serial_no"%>"><%=RS2("serial_no"%><%
RS2.Movenext
Loop
RS2.close
response.write "</select></td>" %>
'End of Query2
<td><font size=2><%=RS("product_name"%></font></td>
<td><font size=2><%=RS("pm"%></font></td>
<td><font size=2><%=RS("substance"%></font></td>
<td><font size=2><%=RS("width_mm"%></font></td>
<td><font size=2><%=RS("length_mm"%></font></td>
</tr><%
count_1=count_1+1
RS.Movenext
Loop
RS.close
Conn.close
%>
Thanks a lot,
Best Regards,
Parames.S
Need to know how to customize the below code, so, that it can be faster a bit..
1) If i run this code, it takes about 18/19 seconds to load the page.
2) And If i eliminate the Query2 (from 'start of Query2' to 'End of Query2') inside the Query Loop, it takes about 7/8 seconds..
Any suggestions please..
Dim count_1
count_1=0
Query = "select p_code, product_name, pm, substance, width_mm, from fg_lcb order by no desc"
Set RS=Conn.Execute(Query)
Do while Not RS.EOF
product_code = RS1("product_code"
%><tr bgcolor=#eeeeee>
<td><input type=checkbox name=sel_value value="<%=p_code%></td>
<td><font size=2><%=product_code%></font></td>
<td><select name="serial<%=count_1%>"><%
'Start of Query2
Query2 = "select serial_no,from_location,qty,weight,quality,remark from fg_lcb where product_code='"&product_code&"' order by no desc limit 2"
Set RS2=Conn.Execute(Query2)
Do while Not RS2.EOF %>
<option value="<%=RS2("serial_no"%>"><%=RS2("serial_no"%><%
RS2.Movenext
Loop
RS2.close
response.write "</select></td>" %>
'End of Query2
<td><font size=2><%=RS("product_name"%></font></td>
<td><font size=2><%=RS("pm"%></font></td>
<td><font size=2><%=RS("substance"%></font></td>
<td><font size=2><%=RS("width_mm"%></font></td>
<td><font size=2><%=RS("length_mm"%></font></td>
</tr><%
count_1=count_1+1
RS.Movenext
Loop
RS.close
Conn.close
%>
Thanks a lot,
Best Regards,
Parames.S