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

Error en Paginacion

Estas en el tema de Error en Paginacion en el foro de ASP Clásico en Foros del Web. Estoy creando una paginacion y me sale el siguiete error Error Type: ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, ...
  #1 (permalink)  
Antiguo 20/01/2004, 10:24
 
Fecha de Ingreso: octubre-2003
Ubicación: Dominicana
Mensajes: 17
Antigüedad: 20 años, 8 meses
Puntos: 0
Error en Paginacion

Estoy creando una paginacion y me sale el siguiete error


Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/ConsultaC.asp, line 117

En la linea 117 lo que hay es esto

<%FuenteDatos.AbsolutePage = PaginaActual %>


Este es el codigo entero

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<!-- #Include Virtual="Adovbs.inc"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<%
Dim PaginaActual ' en qué pagina estamos
Dim PaginasTotales ' cuántas páginas tenemos
Dim TamPagina ' cuantos registros por pagina
Dim CuantosRegistros ' la cuenta que os he mencionado

TamPagina=20
If Request.QueryString("Pagina") = "" then
PaginaActual=1
Else
PaginaActual=CInt(Request.QueryString("Pagina"))
End if


Dim Valor
Valor = Request("Lista")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Mode = 3
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\db\Solicitud.mdb"))

Actual=Request.Form("textfield")
Fecha = Month(Actual) & "/" & Day(Actual) & "/" & Year(Actual)

Select case Valor
Case "Todos"
strDatos = "Select * From Datos"
Case "Nombre"
strDatos = "Select * From Datos Where Nombre Like '"&Request("textfield")&"%'"
Case "Apellidos"
strDatos = "Select * From Datos Where Apellidos Like'"&Request("textfield")&"%'"
Case "Cedula"
strDatos = "Select * From Datos Where Cedula = '"&Request("textfield")&"'"
Case "Fecha"
strDatos = "Select * From Datos Where FechaS =" & Fecha

Case else
strDatos = "Select * From Datos"
End Select
Set FuenteDatos = Server.CreateObject("ADODB.RecordSet")
FuenteDatos.CursorType = 1
FuenteDatos.LockType = 2
FuenteDatos.PageSize=TamPagina
FuenteDatos.CacheSize=TamPagina
FuenteDatos.Open strDatos, oConn
PaginasTotales=FuenteDatos.PageCount

If PaginaActual < 1 then
PaginaActual = 1
End if
If PaginaActual > PaginasTotales then
PaginaActual = PaginasTotales
End If

%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%">&nbsp;</td>
<td width="98%"> <form name="Forma" Methot= "POst" action="ConsultaC.asp">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E6E2">
<tr>
<td colspan="3" bgcolor="#000066"><strong><font color="#FFFFFF">Buscar
por ......</font></strong></td>
</tr>
<tr>
<td width="12%">&nbsp;</td>
<td width="42%"> <select name="Lista">
<option selected>Todos </option>
<option value ="Nombre">Nombre</option>
<option>Apellidos</option>
<option>Cedula</option>
<option>Fecha </option>
<option>&lt;---------------&gt;OPCIONES&lt;---------------&gt;</option>
</select></td>
<td width="46%" bordercolor="#000066">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="textfield" type="text" size="60"></td>
<td><input type="submit" name="Submit" value="Realizar Busqueda"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</form></td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td> <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000066" bgcolor="#E7E6E2">
<tr>
<td colspan="6" bgcolor="#000066"><strong><font color="#FFFFFF">Consulta
de Solicitudes de Credito</font></strong></td>
</tr>
<tr bgcolor="#0000CC">
<td width="18%"><font color="#FFFFFF"><strong>Numero</strong></font></td>
<td width="18%"><font color="#FFFFFF"><strong>Nombre</strong></font></td>
<td width="20%"><font color="#FFFFFF"><strong>Apellidos</strong></font></td>
<td width="16%"><font color="#FFFFFF"><strong>Cedula</strong></font></td>
<td width="13%"><font color="#FFFFFF"><strong>Fecha</strong></font></td>
<td width="14%"><font color="#FFFFFF"><strong>Institucion</strong></font></td>
</tr>
<%FuenteDatos.AbsolutePage = PaginaActual
CuantosRegistros=0 %>
<% Do While Not FuenteDatos.EOF and CuantosRegistros < TamPagina%>
<tr>
<td height="21"><a Class = "Num" href="FormActualiza.asp?Numero=<%=FuenteDatos("Num ero")%>"><%=FuenteDatos("Numero")%></a></td>
<td><a class = "Nom" href="FormActualiza.asp?Numero=<%=FuenteDatos("Num ero")%>"><%=FuenteDatos("Nombre")%></a></td>
<td><a class = "Apel" href="FormActualiza.asp?Numero=<%=FuenteDatos("Num ero")%>"><%=FuenteDatos("Apellidos")%></a></td>
<td><a class = "Ced" href="FormActualiza.asp?Numero=<%=FuenteDatos("Num ero")%>"><%=FuenteDatos("Cedula")%></a></td>
<td><a class = "Fec" href="FormActualiza.asp?Numero=<%=FuenteDatos("Num ero")%>"><%=FuenteDatos("FechaS")%></a></td>
<td><a class = "Inst" href="FormActualiza.asp?Numero=<%=FuenteDatos("Num ero")%>"><%=FuenteDatos("Institucion")%></a></td>
</tr>
<%
CuantosRegistros = CuantosRegistros + 1
FuenteDatos.MoveNext%>
<%Loop
FuenteDatos.Close
oConn.Close
Set FuenteDatos = Nothing
Set oConn = Nothing
%>
</table></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000066">
<tr>
<% If PaginaActual > 1 then %>
<td width="48%"> </td>

<td width="25%">
<%Response.Write("<A HREF=ConsultaC.asp?pagina="&PaginaActual-1&"> Pagina Anterior </A>")%>
</td>
<% End if %>
<% If PaginaActual < PaginasTotales then %>
<td width="27%">
<%Response.Write("<A HREF=ConsultaC.asp?pagina="&PaginaActual+1&"> Pagina Siguiente </A>")%>
</td>
<%End if%>
</tr>
</table></td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
  #2 (permalink)  
Antiguo 21/01/2004, 00:36
Avatar de mamon  
Fecha de Ingreso: enero-2002
Ubicación: Lima
Mensajes: 1.302
Antigüedad: 22 años, 5 meses
Puntos: 3
prueba cambiando

FuenteDatos.Open strDatos, oConn

en esto

FuenteDatos.Open strDatos, oConn,3,1

si no funciona asi... igual cambialo pero borra

oConn.Mode = 3

si ya no funciona asi..tons ya no sé
__________________
Yo si sé lo que es trabajar duro, porque lo he visto.
  #3 (permalink)  
Antiguo 21/01/2004, 00:44
Avatar de mamon  
Fecha de Ingreso: enero-2002
Ubicación: Lima
Mensajes: 1.302
Antigüedad: 22 años, 5 meses
Puntos: 3
aahhh!! si no funciona lo que te di puedes entrar a http://www.soloasp.com.ar/vereje.asp?eje=30
__________________
Yo si sé lo que es trabajar duro, porque lo he visto.
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:34.