Foros del Web » Programando para Internet » ASP Clásico »

Poner dos whiles del mismo recordset en distintas posiciones y no respeta el paginado

Estas en el tema de Poner dos whiles del mismo recordset en distintas posiciones y no respeta el paginado en el foro de ASP Clásico en Foros del Web. tengo el siguiente codigo el cual solo me despliega informadion en pantalla y la cual va paginada.el problema ke tengo es ke kiero ejecutar dos ...
  #1 (permalink)  
Antiguo 24/08/2004, 09:33
 
Fecha de Ingreso: noviembre-2003
Mensajes: 343
Antigüedad: 20 años, 7 meses
Puntos: 0
Poner dos whiles del mismo recordset en distintas posiciones y no respeta el paginado

tengo el siguiente codigo el cual solo me despliega informadion en pantalla y la cual va paginada.el problema ke tengo es ke kiero ejecutar dos do while de la misma
tabla nadamas ke en dos celdas diferente esto es porke en l segunda celda se va a poner un ILAYER y pues elwhile tiene
ke ser separado..ç

Me podrain indicar como puedo poner el segun while...
Yo lo pongo al cual pero la infor de la segunda no despliega nada con los paramentros de paginacion si se los kitamos y dejamos
el puro EOF funciona pero no hace nada de la paginacion se los indico a continuacion y hay si le saben pues ayudenme a corregirlo.
GRACIAS
estara indicado por ****

<html>
<head>
<title>EIPL PART NUMBER - Sistema G2B</title>
</head>
<%
if lstrbuscar =1 then
lstrQuery = "Select * From EIPL"
response.write(lstrquery)

if lstrtxtMC <> "" AND lstrtxtPN <> "" then
lstrQuery = "Select * From EIPL WHERE PLA = '" + lstrtxtPLA + "' AND MC= '" + lstrtxtMC + "' AND PN LIKE '" + lstrtxtPN + "%' "
response.write(lstrquery)
end if

end if

'pagina
TamPagina=15

'Leemos qué página mostrar. La primera vez será la inicial
if Request.Querystring("pagina")="" then
PaginaActual=1
else
PaginaActual=CInt(Request.Querystring("pagina"))
end if

'pagina
' Defino el tamaño de las páginas
lobjRst.PageSize=TamPagina
lobjRst.CacheSize=TamPagina


' Abro el recordset
lobjRst.Open lstrQuery, lobjConnection


'Cuento las páginas
PaginasTotales=lobjRst.PageCount


'Compruebo que la pagina actual está en el rango
if PaginaActual < 1 then
PaginaActual = 1
end if


if PaginaActual > PaginasTotales then
PaginaActual = PaginasTotales
end if


%>


<body topmargin="0" leftmargin="0" style="text-align: left">
<form name="frm" method="post" action="EIPL_EIPL.asp" onsubmit="return false">
<input type="hidden" name="txtActualizar" size="20">

<table cellpadding="0" cellspacing="0" width="715" height="441">
<!-- MSTableType="layout" -->
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" width="715" height="190" id="table3">
<!-- MSTableType="nolayout" -->
<tr>
<td align="center" valign="top" height="198">
<table border="0" align="left" bordercolor="#d6d3ce" id="table1" width="715" height="156">
<!-- MSTableType="nolayout" -->
<tr>
<td class="InformationText" Textheight="10%" style="padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" align="left" valign="top" width="346" >
</td>
<td height="2" width="353"></td>
</tr>

<tr>
<td class="Informationtext" Textheight="10%" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" align="right" colspan="2" height="20" >
<p align="right">&nbsp;<%if PaginaActual > 1 then
Response.Write("<A HREF=EIPL_EIPL.asp?buscar=1&pagina="& PaginaActual-1& "><img border=0 src=images/Anterior.gif>Anteriores</A>&nbsp;&nbsp;&nbsp;")
end if
%>
<%if PaginaActual < PaginasTotales then
Response.Write("<A HREF=EIPL_EIPL.asp?buscar=1&pagina=" & PaginaActual+1 &">Siguientes<img border=0 src=images/Siguiente.gif></A>")
end if
%></td>
</tr>
<tr>
<td title="Ver USAGES de este BLOCK" class="Informationtext" Textheight="10%" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" align="left" width="344" valign="top">
<table cellpadding="0" cellspacing="0" width="341" height="49">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" height="19">a</td>
</tr>
<%
'************************************************* ************************************************** *************************
'Esta es la celda izquierda ke despleiga bien la informacion con respectivo paginado

lintRegistrosEnPantalla= 0
do while not lobjRst.EOF and CuantosRegistros < TamPagina
lintRegistrosEnPantalla = lintRegistrosEnPantalla +1
%>
<tr>
<td valign="top" height="17">&nbsp;<%Response.Write(""&lobjRst.Fiel ds("PLA")&"")%></td>
</tr>
<% CuantosRegistros=CuantosRegistros+1
lobjRst.MoveNext
loop
'lobjRst.Close
'************************************************* ************************************************** ***********************
%>
<tr> <td height="13" width="341" valign="top">c</td> </tr> </table> </td> <td title="Ver USAGES de este BLOCK" class="Informationtext" Textheight="10%" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" align="left" width="345" valign="top">
<table cellpadding="0" cellspacing="0" width="346"><tr> <td height="18" valign="top">d</td> </tr>
<%
'************************************************* ************************************************** *************************
'Esta es la segunda celda(Derecha) que namas no kiere, si le dejamos el puro EOF despliega info pero no respeta el paginado
do while not lobjRst.EOF
%>
<tr> <td valign="top" height="17">&nbsp;</td> </tr>
<% lobjRst.MoveNext
loop
lobjRst.Close
'************************************************* ************************************************** *************************
%> <tr><td height="9" valign="top">f</td></tr> </table> </td> </tr> <tr>
<td class="Informationtext" Textheight="10%" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" align="left" colspan="2" valign="top" height="17">
<p align="right">&nbsp;<input type="hidden" name="txtCount" value="<%=lintRegistrosEnPantalla%>">
<%if PaginaActual > 1 then
Response.Write("<A HREF=EIPL_EIPL.asp?buscar=1&pagina="& PaginaActual-1& "><img border=0 src=images/Anterior.gif>Anteriores</A>&nbsp;&nbsp;&nbsp;")
end if %>
<%if PaginaActual < PaginasTotales then
Response.Write("<A HREF=EIPL_EIPL.asp?buscar=1&pagina=" & PaginaActual+1 &">Siguientes<img border=0 src=images/Siguiente.gif></A>")
end if
%>
<%end if%>
</td>
</tr></table> </td> </tr> <tr>
<td height="25" bgcolor="#D2D2D2" width="715" valign="top"><!-- #include file="includes/G2B_Pie.asp" --></td>
</tr> </tr> </tr> </tr> </tr> </tr> </tr></tr>/body>/html>
__________________


La tecnología es un hecho objetivo, y el resultado está sujeto a la voluntad humana.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:46.