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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populating a table with two cells/row using 1 db field

Status
Not open for further replies.

mww22

Programmer
Sep 30, 2002
14
0
0
US
I would like to know how to populate a table with the contents of a 2 field table in SQL. The way that I thought would work isn't.... Anyway here is the code I wrote to do it....
<%
Do While Not objRS.EOF
Response.Write &quot;<TR>&quot; & VBCRLF & &quot;<TD width=% align=center valign=middle border=1>&quot; & VBCRLF
Response.Write VBTAB & &quot;<A href=whatever.asp?TA_ID=&quot; & objRS(&quot;lngTopicAreaID&quot;) & &quot;&TA=&quot; & Server.URLEncode(objRS(&quot;strTopicArea&quot;)) & &quot;>&quot;
Response.Write objRS(&quot;strTopicArea&quot;)
Response.Write &quot;</A>&quot; & VBCRLF & &quot;</TD>&quot; & VBCRLF & &quot;</TR>&quot; & VBCRLF
objRS.MoveNext
Response.Write &quot;<TD width=% align=center valign=middle border=1>&quot; & VBCRLF
Response.Write VBTAB & &quot;<A href=joe.asp?IW_ID=&quot; & objRS(&quot;lngIndexWordID&quot;) & &quot;&IW=&quot; & Server.URLEncode(objRS(&quot;strIndexWord&quot;)) & &quot;>&quot;
Response.Write objRS(&quot;strIndexWord&quot;)
Response.Write &quot;</A>&quot; & VBCRLF & &quot;</TD>&quot; & VBCRLF & &quot;</TR>&quot; & VBCRLF
objRS.MoveNext

Loop
Call DBClose()
%>
It ends up throwing an exception error # 0x80020009
If anybody has any suggestions on how to do what I want to do, I would appreciate it.
Thanks in advance,
MWW22
 
Correction to the error I made :)
I would like to know how to populate a table with the contents of a 2 field table in SQL. The way that I thought would work isn't.... Anyway here is the code I wrote to do it....
<%
Do While Not objRS.EOF
Response.Write &quot;<TR>&quot; & VBCRLF & &quot;<TD width=% align=center valign=middle border=1>&quot; & VBCRLF
Response.Write VBTAB & &quot;<A href=whatever.asp?TA_ID=&quot; & objRS(&quot;lngIndexWordID&quot;) & &quot;&TA=&quot; & Server.URLEncode(objRS(&quot;strIndexWord&quot;)) & &quot;>&quot;
Response.Write objRS(&quot;strIndexWord&quot;)
Response.Write &quot;</A>&quot; & VBCRLF & &quot;</TD>&quot; & VBCRLF & &quot;</TR>&quot; & VBCRLF
objRS.MoveNext
Response.Write &quot;<TD width=% align=center valign=middle border=1>&quot; & VBCRLF
Response.Write VBTAB & &quot;<A href=joe.asp?IW_ID=&quot; & objRS(&quot;lngIndexWordID&quot;) & &quot;&IW=&quot; & Server.URLEncode(objRS(&quot;strIndexWord&quot;)) & &quot;>&quot;
Response.Write objRS(&quot;strIndexWord&quot;)
Response.Write &quot;</A>&quot; & VBCRLF & &quot;</TD>&quot; & VBCRLF & &quot;</TR>&quot; & VBCRLF
objRS.MoveNext

Loop
Call DBClose()
%>
It ends up throwing an exception error # 0x80020009
If anybody has any suggestions on how to do what I want to do, I would appreciate it.
Thanks in advance,
MWW22
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top