
05/01/2002, 15:07
|
 | | | Fecha de Ingreso: diciembre-2001 Ubicación: Monterrey NL
Mensajes: 263
Antigüedad: 23 años, 5 meses Puntos: 0 | |
Re: Ordenar base de datos Este es el codigo
<!-- Manual de ASP de WebEstilo.com -->
<html>
<head>
<title>Ejemplo de ASP</title>
</head>
<body>
<H1>Ejemplo de uso de bases de datos con ASP y ADO</H1>
<%
Dim oConn,strSQL, objRS
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("cgi-bin/datos.mdb"))
strSQL = "SELECT Nombre, Apellidos, Telefono FROM prueba WHERE Apellidos LIKE '%Perez%'order by nombre"
Set objRS = oConn.Execute(strSQL)
%>
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR><TD> Nombre</TD><TD> Apellidos </TD><TD> Telefono </TD></TR>
<%
while (not objRS.Eof)
Response.Write("<tr><td>&nbsp ;" & objRS("Nombre") & "</td><td>&nbsp;" & objRS("Apellidos") & "&nbsp;</td><td>&nbsp;" & objRS("Telefono") & "</td></tr>")
objRS.MoveNext
wend
oConn.Close
set objRS = nothing
set oConn = nothing
%>
</table>
</body>
</html>
<html><center><embed src="http://www.maxivision.com.mx/firma.swf" height=60 width=500>
</embed></center></html> |