Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'pretend we have a recordset called objRS
CONST COL_COUNT = 3
If Not objRS.EOF Then objRS.MoveFirst
Dim col_ctr
col_ctr = 0 'not really necessary
Response.Write "<table><tr><th colspan=""" & COL_COUNT & """>Results</th></tr>"
Do Until objRS.EOF
If col_ctr mod COL_COUNT = 0 Then Response.Write "<tr>"
Response.Write "<td>" & objRS("filedname") & "</td>"
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then Response.Write "</tr>"
col_cnt = col_cnt + 1
Loop
Response.Write "</table>"
Set con = Server.Crea....
Con.Open Blah
Set RS = Con.Execute(blah)
' Checks for Records, errors no data or makes table
If not RS.Eof Then
%>
<table>
<%
' Makes the Column Headers with the field names
Response.Write "<tr>"
For each field in Rs.Fields
Response.Write "<td><b>" & Field.Name & "</b></td>"
Next
Response.Write "</tr>"
' Cycle Records and Sub Cycle Fields
Do While Not Rs.EOF
Response.Write "<tr>"
For each field in Rs.Fields
Response.Write "<td>" & Server.HTMLEncode(RS(Field.Name)) & "</td>"
Next
Response.Write "</tr>"
RS.MoveNext
Loop
%>
</table>
<%
Else
response.write "No data"
End If
Set RS = nothing
Con.Close
Set Con = nothing
<% CONST COL_COUNT = 3
If Not abc.EOF Then abc.MoveFirst
Dim col_ctr
col_ctr = 0 'not really necessary
Response.Write "<table><tr><th colspan=""" & COL_COUNT & """>Results</th></tr>"
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then Response.Write "<tr>"
Response.Write "<td>" & abc("igdnumber") & "</td>"
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then Response.Write "</tr>"
col_cnt = col_cnt + 1
[highlight]abc.MoveNext[/highlight]
Loop
Response.Write "</table>"%>
<% CONST COL_COUNT = 3
If Not abc.EOF Then abc.MoveFirst
Dim col_ctr
col_ctr = 0 'not really necessary
Response.Write "<table><tr><th colspan=""" & COL_COUNT & """>Results</th></tr>"
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then Response.Write "<tr>"
Response.Write "<td>" & abc("igdnumber") & "</td>"
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then Response.Write "</tr>"
'used to be: col_cnt = col_cnt + 1
col_ctr = col_ctr + 1
abc.MoveNext
Loop
Response.Write "</table>"%>
<% CONST COL_COUNT = 3
If Not abc.EOF Then abc.MoveFirst
Dim col_ctr, sec_row
col_ctr = 0 'not really necessary
sec_row = ""
Response.Write "<table><tr><th colspan=""" & COL_COUNT & """>Results</th></tr>"
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then
Response.Write "<tr>"
rec_row = "<tr>"
End If
Response.Write "<td>" & abc("igdnumber") & "</td>"
sec_row = sec_row & "<td>" & abc("whatever") & "</td>"
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then
Response.Write "</tr>"
Response.Write sec_row & "</tr>"
Response.Write "<tr><td> </td></tr>" 'blank row
End If
'used to be: col_cnt = col_cnt + 1
col_ctr = col_ctr + 1
abc.MoveNext
Loop
Response.Write "</table>"%>
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then
Response.Write "<tr>" ' [red]<< one opened[/red]
rec_row = "<tr>" ' [red]<< [b]not used?[/b][/red]
End If
Response.Write "<td>" & abc("ID") & "</td>" ' [red]<<< Writes every pass through RS loop[/red]
sec_row = sec_row & "<td>" & abc("size") & "</td>" '[red]<<< stores every pass through[/red]
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then
Response.Write "</tr>" '[red] << one closed[/red]
Response.Write sec_row & "</tr>" ' [red]<< [b]two[/b] closed[/red]
Response.Write "<tr><td> </td></tr>" 'blank row
End If
'used to be: col_cnt = col_cnt + 1
col_ctr = col_ctr + 1
' [red] sec_row never set = "", self stacking, [b]possibly rec_row from above?[/b] [/red]
abc.MoveNext
Loop
Response.Write "</table>"
Do Until abc.EOF
If col_ctr mod COL_COUNT = 0 Then
Response.Write "<tr>" ' << one opened
[highlight]sec_row = "<tr>" ' rec_row was supposed to be sec_row :P[/highlight]
End If
Response.Write "<td>" & abc("ID") & "</td>" ' <<< Writes every pass through RS loop
sec_row = sec_row & "<td>" & abc("size") & "</td>" '<<< stores every pass through
If col_ctr mod COL_COUNT = COL_COUNT - 1 Then
Response.Write "</tr>" ' << one closed
Response.Write sec_row & "</tr>" ' << two closed
Response.Write "<tr><td> </td></tr>" 'blank row
End If
'used to be: col_cnt = col_cnt + 1
col_ctr = col_ctr + 1
' sec_row never set = "", self stacking, possibly rec_row from above?
abc.MoveNext
Loop
Response.Write "</table>"