
22/07/2002, 10:55
|
| | Fecha de Ingreso: noviembre-2001
Mensajes: 117
Antigüedad: 23 años, 5 meses Puntos: 0 | |
Re: Maldito dBASE! Soy novato; ¿me podrías decir dónde colocar esa función?
<% Option Explicit
'Declaracion de variables
Dim Obj_Conn
Dim Obj_RS
Dim Pagina
Dim Cont
Dim strSQL
'Fin declaracion de variables
%>
<html>
<head>
</head>
<body>
<%
Set Obj_Conn = CreateObject("ADODB.Connection")
Set Obj_RS = CreateObject("ADODB.Recordset")
Obj_Conn.Open("DefaultDir=" & Server.MapPath("/datos") & ";Driver={Microsoft dBASE Driver(misdatos.DBF)};")
strSQL = "SELECT Password, Username, Nombre, Email, Web, Direccion, Pais, Telefono, Comentario FROM misdatos.DBF"
Obj_RS.Open strSQL, Obj_Conn,3,3
IF Obj_RS.EOF THEN
Response.Write "<center><h1>no existen registros</h1></center>"
ELSE
Obj_RS.PageSize = 5
Pagina = Request.QueryString ("Pagina")
IF Pagina = "" THEN Pagina = 1 ELSE Pagina = CInt(Pagina)
%>
<table border="1" align="center">
<tr>
<td align="center">
<%
IF Pagina > 1 THEN
%>
<a href="paginar.asp?Pagina=<%=Pagina - 1%>">
&lt;%lt; Anterior
</a>
<%
END IF
%>
</td>
<td align="center">
Pagina <%= Pagina %> de <%= Obj_RS.PageCount %>
</td>
<td align="center">
<%
IF Pagina<Obj_RS.PageCount THEN
%>
<a href="paginar.asp?Pagina=<%=Pagina + 1%>">
Siguiente &gt;&gt;
</a>
<%
END IF
%>
</td>
</tr>
<tr>
<th>Nombre</th>
<th>Direccion</th>
<th>Email</th>
</tr>
<%
Obj_RS.AbsolutePage = Pagina
Cont = 0
DO WHILE NOT Obj_RS.Eof
COnt = Cont + 1
IF Cont > Obj_RS.PageSize THEN Exit DO
%>
<tr>
<td><%= Obj_RS ("Nombre") %></td>
<td><%= Obj_RS ("Direccion") %></td>
<td><%= Obj_RS ("Email") %></td>
</tr>
<%
Obj_RS.MoveNext
LOOP
%>
</table>
<%
END IF
Obj_RS.Close
Obj_Conn.Close
SET Obj_RS = Nothing
SET Obj_Conn = Nothing
%>
</body>
</html>
GRACIAS,
Majesus
<a href="http://www.canalpublicidad.com"><img border="0" src="http://www.canalpublicidad.com/images/banner_crystal_g.gif" width="468" height="60"></a> |