This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > April 2004 > ASP: displaying records side by side





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ASP: displaying records side by side
Scott Whittaker

2004-04-21, 2:55 pm

I have been able to get my database records to display in the format I want
in one column like this:

Record 1
Record 2
Record 3

What I want is to have two columns like this:

Record1 Record 2
Record3 Record4

I am not having any luck. I think it has to do with the loop statement.
Here is the code:

<%SQL1 = "Select
MemberName,Business,Address,Phone,Email,CellPhone,MembershipType from
LVLIAMembership order by Business"
Set RC1 = Server.CreateObject("ADODB.Connection")
RC1.ConnectionTimeout = 15
RC1.CommandTimeout = 30
RC1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=d:\users\sonoransites\sonoransites\LeadsGroups\Data\LVLIA.mdb;"
Set RS1 = RC1.Execute(SQL1)

On Error Resume Next
RS1.MoveFirst
do while Not RS1.eof

MEM1 = (RS1.Fields.Item("MemberName").Value)
BUS1 = (RS1.Fields.Item("Business").Value)
ADD1 = (RS1.Fields.Item("Address").Value)
PHO1 = (RS1.Fields.Item("Phone").Value)
CPH1 = (RS1.Fields.Item("CellPhone").Value)
EMA1 = (RS1.Fields.Item("Email").Value)
TYP1 = (RS1.Fields.Item("MembershipType").Value)
RS1.MoveNext%>

I then have my HTML table with the ASP included. The page ends with:

<%
loop
RS1.Close
Set RS1 = Nothing
%>


Can anyone help?



--
Scott Whittaker
SonoranSites
scott@sonoransites.com
www.sonoransites.com


Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews