
09/07/2002, 14:45
|
| | Fecha de Ingreso: julio-2002
Mensajes: 219
Antigüedad: 22 años, 10 meses Puntos: 0 | |
Re: 3 en 3 AQUÍ TIENES UN EJEMPLO QUE HACE LO QUE URJOSE TE EXPLICA.
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
Dim objCon, RS, counter
'Conexión con la base de datos
Set objCon = Server.CreateObject("ADODB.Connection")
objCon.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("BDPrueba.mdb"))
strSQL = "SELECT * FROM Respuesta"
Set RS = objCon.Execute(strSQL)
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
counter=0
Do While Not Rs.EOF
%>
<td><%=rs("nombre")%></td>
<%
counter=counter+1
RS.MoveNext
If counter MOd 3=0 Then Response.Write "</tr><tr>"
Loop
%>
</tr> </table>
</BODY>
</HTML>
Suerte. |