Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text data in a table not populating correctly

Status
Not open for further replies.

marydn

Programmer
Mar 26, 2001
152
US
I am trying to take data from a database and fill up a table in a row, column format. Instead of getting:

Reg Proj Ter Comments
a b c d
e f g h


I get:
Reg Proj Ter Comments
a b c d e f g h

Here is the code.....Can anybody help meeeeeeeeeee........

<HTML>
<BODY>

<%
Dim objRS
Set objRS=Server.CreateObject (&quot;ADODB.Recordset&quot;)
objRS.Open &quot;BTSCurrentActivity&quot;,objConn,,,adcmdTable
%>

<TABLE>
<CAPTION>
BTS Current Activity Report (Edit Mode)
</CAPTION>

<TR>
<TH>Region</TH>
<TH>Project Name</TH>
<TH>Territory</TH>
<TH>Originally Awarded</TH>
<TH>Anchor Tenant Rent Year One</TH>
<TH>AnchorTenant Rent Year Three</TH>
<TH>Comments</TH>
</TR>

<%

Do While Not objRS.EOF
Response.Write &quot;<TD><input type=text name=Reg
value=&quot; & objrs(&quot;Region&quot;)& &quot;</TD>&quot;
Response.Write &quot;<TD><input type=text name=Reg
value=&quot; & objrs(&quot;ProjectName&quot;)& &quot;</TD>&quot;
Response.Write &quot;<TD><input type=text name=Reg
value=&quot; & objrs(&quot;Territory&quot;)& &quot;</TD>&quot;
Response.Write &quot;<TD><input type=text name=Reg
value=&quot; & objrs(&quot;OriginallyAwarded&quot;)& &quot;</TD>&quot;
Response.Write &quot;<TD><input type=text name=Reg
value=&quot; & objrs(&quot;AnchorTenantRent1&quot;)& &quot;</TD>&quot;
Response.Write &quot;<TD><input type=text name=Reg
value=&quot; & objrs(&quot;AnchorTenantRent3&quot;)& &quot;</TD>&quot;
Response.Write &quot;<TD><input type=text name=Reg v
Value=&quot; & objrs(&quot;Comments&quot;)& &quot;</TD>&quot;
objRS.MoveNext
loop
objRS.Close
Set objrs = Nothing
objconn.close
Set objconn = Nothing
%>
</TABLE>
</BODY>
</HTML>

THANKS!
 
marydn,

You need &quot;<tr>&quot; and &quot;</tr>&quot; to denote rows.


fengshui_1998
 
Thanks FengShui,

I actually realized that after I submitted the post,errrrr. I have a new problem - the </TD> shows up as part of the data. For example, KS/NE</TD. But only for some of the fields - any help would be wooonderfullllll!!!

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top