I am filling an HTML Table with values from a select statement. I would like the first row to have the Column Names from the database. How do I select the column names?
Here is my ASP code:
------------------------------------------
<tr><% for each x in rs.Fields %>
<td class="nowrapWhite" bgcolor="#666666"><% Response.Write(x.fieldname) %></td>
<% next %></tr>
<% do until rs.EOF %>
<tr><% for each x in rs.Fields %>
<td class="nowrap"><% Response.Write(x.value) %></td>
<% next %></tr>
<% rs.MoveNext %>
<% loop %>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.