Whats the most efficient way of.....

Results 1 to 2 of 2

Thread: Whats the most efficient way of.....

  1. #1
    Join Date
    Dec 1969

    Default Whats the most efficient way of.....

    I have a table with two columns (sessionid, clientname) and there are 4 sessions(A,B,C,D). There can be max of 6 clients allocated to a session. I would like to output the contents of this table into a grid(HTML table).<BR><BR>So for a table consisting of these values……<BR><BR>SessionID ClientName<BR>A John<BR>B Steve<BR>C Claire<BR>D Simon<BR>C Jan<BR>B Alison<BR>A Carl<BR>A Peter<BR><BR>Would produce a grid like this……….<BR><BR>A John Carl Peter<BR>B Steve Alison <BR>C Claire Jan <BR>D Simon<BR><BR>How can I do this and not hard code it?

  2. #2
    Join Date
    Dec 1969

    Default RE: Whats the most efficient way of.....

    Naturally you will need to set up your connection object and all of that, but this will do what you need it to.<BR><BR>mj<BR><BR><BR><BR>for myChar = 65 to 68 <BR> Set objRs = Server.CreateObject("adodb.recordset")<BR> <BR> sqlText = "Select * from Sessiontest11232001 where session = &#039;" & chr(MyChar) &"&#039;"<BR> objRS.Open sqlText, strConn, 3,3<BR> Response.Write objRS("session")<BR> Do while not objrs.EOF <BR> Response.Write " " & objRS("Name") & " "<BR> objrs.MoveNext<BR> loop<BR> <BR> Response.Write "<BR>"<BR> objrs.Close<BR> Set objRS = nothing <BR> <BR> <BR>next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts