Optimize
This is a combobox inside a form. The problem is that is grabs from a table with about 40,000 records, which is probaly pretty silly. Is there a way I can optimize this. Maybe with a stored proc, would that help any? Any suggestions would be appreciated.
<%
SET rs = server.CreateObject("ADODB.RECORDSET")
rs.Open "SELECT ps_Id AS Value, Ps_CodFab AS Nombre FROM TbNvLpPsMaestroGrl ORDER BY Ps_CodFab", conn, adOpenStatic, adLockReadOnly
%>
<TD class=DetalleTitulo> Componente</TD>
<TD class=DetalleDato>
<SELECT id="Cmb1" name=ps_Id tabindex="3">
<OPTION value="">Componentes</OPTION>
<%Do While Not rs.EOF%>
<OPTION value="<%=rs.Fields("Value")%>" <%If Trim(Request.QueryString("ps_Id")) = Trim(rs.Fields("Value")) Then%>selected<%End If%>><%=rs.Fields("Nombre")%></OPTION>
<%rs.MoveNext
Loop%></SELECT>
<%
rs.Close
set rs = nothing
%>
|