<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<%
Dim Conexion, rsConsulta, SentenciaSQL
Set Conexion=Server.CreateObject("ADODB.CONNECTION")
Conexion.Open "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=ejemplos.mdb"
Set rsConsulta=Server.CreateObject("ADODB.RECORDSET")
SentenciaSQL="SELECT nombre FROM ejemplo"
rsConsulta.Open SentenciaSQL,Conexion
If rsConsulta.Recount > 0 Then
While NOT rsConsulta.EOF
Response.Write(rsConsulta("nombre ") & "<br>")
rsConsulta.MoveNext
wend
Else
Response.Write("No hay datos ha mostrar.")
End If
registros.Close
Set registros = Nothing
conexion.Close
Set conexion = Nothing
%>
</body>
</html>