read1 참고
<html>
<head>
<title>Contents</title>
</head>
<body bgcolor="#FFFFFF">
<p><big><big>Categories</big></big> </p>
<hr size="1" align="left">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=win.dsn"
Conn.Open
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "Select * From tblProducts", Conn
%>
<table border="1" width="670">
<tr bgcolor="gray">
<td width="155" height="11">
<p><b>Product Name</b></p>
</td>
<td width="159" height="11">
<p><b>Unit Price</b></p>
</td>
<td width="334" height="11">
<p><b>Units In Stock</b></p>
</td>
</tr>
<%
while not Rs.eof
%>
<tr>
<td width="155" height="3">
<p><input type="submit" name="formbutton1"></p>
</td>
<td width="155" height="3">
<p><%=Rs("ProductName")%></p>
</td>
<td width="159" height="3">
<p><%=Rs("UnitPrice")%></p>
</td>
<td width="334" height="3">
<p><%=Rs("UnitsInStock")%></p>
</td>
</tr>
<%
Rs.movenext
Wend
Rs.close
set Rs=nothing
Conn.close
Set Conn=nothing
%>
</table>
<p align="left"><strong>SQL:</strong> <font face="Times New Roman" size="3" color="#000000">Select *
From
tablename</font></p>
<p align="left"><a href="main.asp">Main</a></p>
</body>
</html>