<% Dim newStatus, Program, Plink, Nlink, Mlink, titlename, revision, RS, RS2, Connections, altrow, rowcolor DSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\db\takeoff.mdb") & ";" Set OBJdbConnection = Server.CreateObject("ADODB.Connection") OBJdbConnection.Open(DSN) SQLQuery = "SELECT * FROM TakeoffServices ORDER BY state, City" Set RS = OBJdbConnection.Execute(SQLQuery) %>

Takeoff Services

<% 'will iterate to display the records got from the database response.write("") altrow = 0 Do While Not RS.EOF 'set the alternating color for the row if altrow = 0 then rowcolor = "" else rowcolor = " class=alt" end if if rs("Phone") <> blank then Connections = (rs("Phone") & "
") end if if rs("contact") <> blank then Connections = " " & Connections & rs("contact") end if if rs("Web") <> blank then Connections = Connections & "" &" " & rs("web") end if If rs("State") <> blank then Response.write(("")) else Response.write(("")) end if If rs("Company") <> blank then Response.write(("")) else Response.write(("")) end if If rs("City") <> blank then Response.write(("")) else Response.write(("")) end if If rs("Service") <> blank then Response.write(("")) else Response.write(("")) end if If Connections <> blank then Response.write(("")) else Response.write(("")) end if 'alternate row color if altrow = 0 then altrow = 1 else altrow = 0 end if RS.MoveNext Loop %>
State Company City Services Connection
" & rs("state") & " " & rs("Company") & " " & rs("City") & " " & rs("Service") & " ")) Response.write(Connections) Response.write(("
 
<%RS.Close Set RS = Nothing OBJdbConnection.Close Set OBJdbConnection = Nothing %>