<% option explicit Response.Buffer = True %> <!--#INCLUDE Virtual="adovbs.inc"--> <% dim ColumnArray(), DataArray() dim intColumns, sql, i, j, k, txtContinue dim rs, Conn intColumns = 1 Set Conn = Server.CreateObject("ADODB.Connection") Conn.ConnectionString = "YourDSNConnection" Conn.Open sql = "SELECT txtSiteName " sql = sql & "FROM tblASPSites " sql = sql & "ORDER BY txtSiteName" set rs = server.CreateObject("ADODB.Recordset") rs.Open sql, Conn, adOpenStatic redim ColumnArray(intColumns-1) for i = 0 to ubound(ColumnArray) ColumnArray(i) = rs.RecordCount * (i+1)/(intColumns) next redim DataArray(rs.RecordCount,intColumns) for i = 0 to intColumns - 1 k = 0 do while j < ColumnArray(i) DataArray(k,i) = rs("txtSiteName") j = j + 1 k = k + 1 rs.MoveNext loop next rs.Close set rs = Nothing conn.Close set conn = Nothing %> <table border=1 width=600 align=center> <% for i = 0 to ubound(DataArray) Response.Write("<tr>") for j = 0 to intColumns - 1 Response.Write("<td>") if DataArray(i,j) <> "" then Response.Write(DataArray(i,j)) else Response.Write("&nbsp;") end if Response.Write("</td>") next Response.Write("</tr>") txtContinue = "" for j = 0 to intColumns - 1 txtContinue = txtContinue & DataArray(i+1,j) next if txtContinue = "" then Exit For end if next %> </table>