saljb
06-21-2005, 09:28 PM
I have colums in my table named feature1, feature2, feature3, etc....
I would like to write them in my asp document with a line break in between them. I did this:
<%Response.Write Recordset("feature1")%>
<br />
<%Response.Write Recordset("feature2")%>
<br />
<%Response.Write Recordset("feature3")%>
<br />
<%Response.Write Recordset("feature4")%>
<br />
<%Response.Write Recordset("feature5")%>
<br />
<%Response.Write Recordset("feature6")%>
<br />
<%Response.Write Recordset("feature7")%>
But then if one of the recordsets are empty there will be an unnecessary line break. So then I tried this:
<%
dim features
features = (Recordset("feature1") & Recordset("feature2") & Recordset("feature3") & Recordset("feature4") & Recordset("feature5") & Recordset("feature6") & Recordset("feature7"))
%>
<%=features%>
But then they are right next to each other.
How can I write the code so that a line break is inserted after each non-empty recordset
or is there a way to write the row (not the column) from the access database and choose which fields to display (I will assume by column name)
e.g. I would want to display only fields from Row name1 but only those fields under Column Name2 thru Column Name4
Col Name 1 |Col Name 2 |Col Name 3 |Col Name 4 |
Row Name1 |Row Name1 |Row Name1 |Row Name1 |
Row Name2 |Row Name2 |Row Name2 |Row Name2 |
Row Name3 |Row Name3 |Row Name3 |Row Name3 |
Row Name4 |Row Name4 |Row Name4 |Row Name4 |
what is the most efficient method for what I am looking for?
Thanks.SalJB
I would like to write them in my asp document with a line break in between them. I did this:
<%Response.Write Recordset("feature1")%>
<br />
<%Response.Write Recordset("feature2")%>
<br />
<%Response.Write Recordset("feature3")%>
<br />
<%Response.Write Recordset("feature4")%>
<br />
<%Response.Write Recordset("feature5")%>
<br />
<%Response.Write Recordset("feature6")%>
<br />
<%Response.Write Recordset("feature7")%>
But then if one of the recordsets are empty there will be an unnecessary line break. So then I tried this:
<%
dim features
features = (Recordset("feature1") & Recordset("feature2") & Recordset("feature3") & Recordset("feature4") & Recordset("feature5") & Recordset("feature6") & Recordset("feature7"))
%>
<%=features%>
But then they are right next to each other.
How can I write the code so that a line break is inserted after each non-empty recordset
or is there a way to write the row (not the column) from the access database and choose which fields to display (I will assume by column name)
e.g. I would want to display only fields from Row name1 but only those fields under Column Name2 thru Column Name4
Col Name 1 |Col Name 2 |Col Name 3 |Col Name 4 |
Row Name1 |Row Name1 |Row Name1 |Row Name1 |
Row Name2 |Row Name2 |Row Name2 |Row Name2 |
Row Name3 |Row Name3 |Row Name3 |Row Name3 |
Row Name4 |Row Name4 |Row Name4 |Row Name4 |
what is the most efficient method for what I am looking for?
Thanks.SalJB