if Not adRs.EOF then response.write "<table border=1>" Do until adRs.EOF response.write "<tr>" for i = 0 to adRs.Fields.Count-1 response.write "<td>" & adRs.fields(i).Value & "</td>" Next response.write "</tr>" adRs.movenext Loop response.write "</table>" end if
I use this code in an app I wrote for work. You need to add some extra stuff in the <head>. You may need to adjust some of it according to what you are doing.