Populates a table with records returned from a database
Populates a table with records returned from a database
Rate Populates a table with records returned from a database
(2(2 Vote))
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open strConnectionString
<html>
<table border="1" cellpadding="4" cellspacing="3" width="598" bordercolorlight="#000080">
<%Set RS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM tblYourTable WHERE field = whatever "
RS.Open strSQL, connection
%>
<%While NOT RS.EOF%>
<td width="129" align="center"><font face="Arial"><font size="2"><%=RS("field1")%></font></font></td>
<td width="65" align="center"><font face="Arial"><font size="2"><%=RS("field2")%></font></font></td>
<td width="79" align="center"><font face="Arial"><font size="2"><%=RS("field3")%></font></font></td>
<td width="86" align="center"><font face="Arial"><font size="2"><%=RS("field4")%></font></font></td>
<td width="72" align="center"><font face="Arial"><font size="2"><%=RS("field5")%></font></font></td>
<td width="77" align="center"><font face="Arial"><font size="2"><%=RS("field6")%></font></font></td>
</tr>
<%RS.MoveNext
Wend
RS.Close
%>
</table>
</html>
Populates a table with records returned from a database Comments
No comments yet — be the first to post one!
Post a Comment