C:\inetpub\wwwroot\demo
read3.asp
<html>
<head>
<title>Contents</title>
</head>
<body>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=win.dsn"
Conn.Open
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "Select * From tblCategories", Conn
%>
<%
while not Rs.eof //레코드선이 마지막줄이 아니라면 반복한다.
%>
<dl>
<dt><b>Category ID: </b> <%=Rs("CategoryID")%> </dt>
<dt><b>Category Name: </b> <%=Rs("CategoryName")%> </dt>
<dt><b>Description: </b> <%=Rs("Description")%> </dt>
</dl>
<hr>
<%
Rs.movenext
Wend
Rs.close
set Rs=nothing
Conn.close
Set Conn=nothing%>
</body>
</html>
크롬 브라우저에서
localhost/www.read1.asp로 실행
localhost는 자신 ip