<%@ Language=VBScript %> <% Option Explicit %> Airlines Header
   
Direct Flight Parking
  Airline Information
Select an airline using alphabetical search (i.e. Air Canada - select "A"):
<% Dim MyConnection, MyData, MyDataTemp, MySQL, OneLetter ' Init connection and data object Set MyConnection = Server.CreateObject("ADODB.Connection") MyConnection.Open "Data Source=directflightparking_airlines" Set MyData = Server.CreateObject("ADODB.Recordset") ' Header of the table Response.Write "" Response.Write "" ' Loop for all letters For OneLetter=Asc("A") To Asc("Z") ' Count airlines names which begin on the OneLetter MySQL="SELECT COUNT(*) AS CountOfAirlines FROM Airlines WHERE AirlineName LIKE '" & Chr(OneLetter) & "%'" Set MyData = MyConnection.Execute(MySQL) if MyData("CountOfAirlines")<>0 then Response.Write "" Else %> <% End If Next Response.Write "" Response.Write "
" & _ "" & _ "" & _ Chr(OneLetter) & " <%= Chr(OneLetter) %>
" MyData.Close MyConnection.Close Set MyData=Nothing Set MyConnection=Nothing %>