<% 'display doodle board i = 1 do while i < 6 j = 1 do while j < 21 sqlQuery = "SELECT * FROM doodleBoard WHERE matrix ='" & i & j & "'" Set conn = Server.CreateObject("ADODB.Connection") conn.Open "shopdb" Set Connection = conn Set rs = conn.Execute(sqlQuery) if not (rs.EOF) then matrix = rs("matrix") state = rs("state") if state then response.write("") else response.write("") end if end if j = j + 1 loop response.write("
") i = i + 1 loop rs.close conn.close set rs = nothing set conn = nothing %>