Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Putting RecordSet Output Into Columns
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

CrAzY
New Member

USA
50 Posts

Posted - 14 March 2001 :  13:14:07  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
I'm attempting to put the output from a RecordSet into 4 columns instead of one long column

Here's the location of how it is now - http://prowler.nokturnal.net/links/

I'd like to get that one long column into 4 like so:

Link 1 Link 2 Link 3 Link 4
Link 5 Link 6 Link 7 Link 8

and so on ... can anyone help me out please?

I'm Beyond Help

CrAzY
New Member

USA
50 Posts

Posted - 16 March 2001 :  20:19:49  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
Anyone have any suggestions for this one?

I'm Beyond Help
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 16 March 2001 :  22:38:48  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
You'd want to do something similar to this(NOTE: didn't test it, just coded off the top of my head):

strSql = "SELECT Link FROM TABLE"
rs.Open strSql, my_Conn
rs.MoveFirst
i = 0
if rs.EOF or rs.BOF then
' Do nothing, no records found
else
Response.Write "<table width='100%'>" & vbCrLf
Response.Write " <tr>" & vbCrLf
do until rs.EOF
Link = rs("Link")
i = i + 1
if i > 4 then
Response.Write " </tr>" & vbCrLf
Response.Write " </tr>" & vbCrLf
i = 1
end if
Response.Write " <td>" & Link & "</td>" & vbCrLf
rs.MoveNext
loop
Response.Write "</table>" & vbCrLf
rs.Close
end if


Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07