Guest_imported
New member
- Jan 1, 1970
- 0
I have a table consisting of 5 columns and 'x' records in an access database. I have connected and can display the records with headers with the following code:
set rs = Server.CreateObject("ADODB.recordset"
sql="SELECT * FROM WebFinErr"
rs.Open sql, conn
%>
<table border="0" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>"
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
I want the 5th column record with it's header to display below the first 4 column records and headers then to loop through the table displaying similarly. An example is as below:
col1header col2header col3header col4header
col1record col2record col3record col4record
col5header
col5record
col1header col2header col3header col4header
col1record col2record col3record col4record
col5header
col5record
col1header col2header col3header col4header
col1record col2record col3record col4record
col5header
col5record
and so on.....
Any help from anyone would make a friend for life!!
set rs = Server.CreateObject("ADODB.recordset"
sql="SELECT * FROM WebFinErr"
rs.Open sql, conn
%>
<table border="0" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>"
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
I want the 5th column record with it's header to display below the first 4 column records and headers then to loop through the table displaying similarly. An example is as below:
col1header col2header col3header col4header
col1record col2record col3record col4record
col5header
col5record
col1header col2header col3header col4header
col1record col2record col3record col4record
col5header
col5record
col1header col2header col3header col4header
col1record col2record col3record col4record
col5header
col5record
and so on.....
Any help from anyone would make a friend for life!!