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

**ayuda Con Paginacion De 2 Recordset***

Estas en el tema de **ayuda Con Paginacion De 2 Recordset*** en el foro de ASP Clásico en Foros del Web. TENGO EL SIGUIENTE CODIGO, QUE NO LOGRO DEJAR PAGINADO ESTOY TRABJANDO CON DREAMWEAVER MX 6 , Y NO HAY CASO, PORQUE ME PIDE QUE UNO ...
  #1 (permalink)  
Antiguo 09/10/2003, 16:36
Usuario baneado!
 
Fecha de Ingreso: enero-2003
Mensajes: 184
Antigüedad: 21 años, 4 meses
Puntos: 0
Exclamación **ayuda Con Paginacion De 2 Recordset***

TENGO EL SIGUIENTE CODIGO, QUE NO LOGRO DEJAR PAGINADO
ESTOY TRABJANDO CON DREAMWEAVER MX 6 , Y NO HAY CASO, PORQUE ME PIDE QUE UNO DELOS 2 RECORDSET, SEA EL QUE LLEVE LA CUENTA DE LA PAGINA PERO ENTONCES SE ME DESCONFIGURAN LAS DEL OTRO TIPO DE RECORDSET

**********************************CODIGO********** ***

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/cn.asp" -->
<%
Dim Rsm
Dim Rsm_numRows

Set Rsm = Server.CreateObject("ADODB.Recordset")
Rsm.ActiveConnection = MM_cn_STRING
Rsm.Source = "SELECT distinct datediff(m,creation_time, getdate()) as uno, right(convert(char(10), creation_time, 103), 7) as dos FROM table_case ORDER BY datediff(m,creation_time, getdate())"
Rsm.CursorType = 0
Rsm.CursorLocation = 2
Rsm.LockType = 1
Rsm.Open()

Rsm_numRows = 0
%>
<%
select_nivel=request.form("Select_nivel")
response.write "select_nivel" & select_nivel & "<br>"
if select_nivel=0 then
select_nivel=0
else
select_nivel=cint(select_nivel)
end if

id_caso = request.Form("textfield")
if id_caso="" then
id_caso=0
else
id_caso=cint(id_caso)
end if


Dim Rs1
Dim Rs1_numRows

Set Rs1 = Server.CreateObject("ADODB.Recordset")
Rs1.ActiveConnection = MM_cn_STRING
if id_caso>=1 then
Rs1.Source = "SELECT title,convert(Int,table_case.id_number)as id_number FROM dbo.table_case where id_number = " & Cint(id_caso)& " order by id_number"
id_caso=0
else
Rs1.Source = "SELECT title,convert(Int,table_case.id_number)as id_number FROM dbo.table_case where datediff(m,creation_time, getdate()) ="& select_nivel '& " order by id_number"
response.write "SELECT title,convert(Int,table_case.id_number)as id_number FROM dbo.table_case where datediff(m,creation_time, getdate()) ="& select_nivel '& " order by id_number"
end if
'Rs1.Source = "SELECT title, id_number, creation_time FROM dbo.table_case where id_number = " & cint(id_caso)& " order by id_number"
Rs1.CursorType = 0
Rs1.CursorLocation = 2
Rs1.LockType = 1
Rs1.Open()

Rs1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 50
Repeat1__index = 0
Rs1_numRows = Rs1_numRows + Repeat1__numRows
%>
<html>
<head>
</head>
<body>
<p align="center"><font color="#0000FF" size="5">Ordenes de Trabajos </font></p>
<div align="center">
<form name="form1" method="post" action="listado.asp">
<table width="75%" border="1">
<tr>
<td><div align="center">
<p>N&deg; de Caso.
<input type="hidden" name="TipodeBusqueda">
<input type="text" name="textfield">
<input type="submit" value="Buscar">
</p>

<tr>&nbsp;&nbsp;&nbsp;</tr>
Buscar por Fecha
<tr>&nbsp;</tr>
Nivel :

<select name="select_nivel" onChange="javascript:submit();">
<% do while not RsM.eof%>
<option value=<%=RsM(0)%>><%=RsM(1)%></option>
<% RsM.movenext
Loop%>

</SELECT>
<tr>&nbsp;&nbsp;&nbsp;&nbsp;</tr>
<tr> <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tr></div></td>
</tr>
</table>

</form>
<table width="75%" border="1">
<tr>
<td height="25">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<%
While (NOT Rs1.EOF) '((Repeat1__numRows <> 0)) '
%>
<tr>
<td><%=(Rs1.Fields.Item("id_number").Value)%></td>
<td><%=(Rs1.Fields.Item("title").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Rs1.MoveNext()
Wend
%>
</table>
</div>
<p align="center"><font color="#0000FF" size="5"></font></p>
<div align="center"> </div>

</body>
</html>
<%
Rsm.Close()
Set Rsm = Nothing
%>
<%
Rs1.Close()
Set Rs1 = Nothing
%>


***********************************************

BUENO SI ALGUIEN ME PEUDE AYUDAR ,NOSE SI DEBO PONER OTRO RECORDSET QUE CONTENGA ALOS 2 O ALGO ASI, TENGO QUE VER PERO NO SE COMO HACERLOOOOOO
  #2 (permalink)  
Antiguo 13/10/2003, 02:48
 
Fecha de Ingreso: octubre-2003
Ubicación: Santander
Mensajes: 236
Antigüedad: 20 años, 8 meses
Puntos: 0
Has intentado abrir dos veces la base de datos?

Hola,

¿Has intentado insertar dos conexiones a la base de datos? (es igual que se trate de dos tablas dentro de una misma base de datos).

Ya me dirás.
  #3 (permalink)  
Antiguo 13/10/2003, 06:32
Usuario baneado!
 
Fecha de Ingreso: enero-2003
Mensajes: 184
Antigüedad: 21 años, 4 meses
Puntos: 0
como??
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 13:56.