<% Dim currentYear currentYear = CStr(DatePart("yyyy", Now)) 'Get the current year 'Validate parameters, up to 2 digit month and 4 digit year From_Month = RegExResults(Request.QueryString("From_Month"), "^(1[012]|0?[1-9])|(?:[\s\S])", "$1") From_Year = RegExResults(Request.QueryString("From_Year"), "^(199[0-9]|2[01]\d{2})|(?:[\s\S])", "$1") To_Month = RegExResults(Request.QueryString("To_Month"), "^(1[012]|0?[1-9])|(?:[\s\S])", "$1") To_Year = RegExResults(Request.QueryString("To_Year"), "^(199[0-9]|2[01]\d{2})|(?:[\s\S])", "$1") if From_Month>"" and From_Year>"" and To_Month>"" and To_Year>"" Then if From_Year > currentYear Then From_Year = currentYear end if if CStr(DatePart("m", Now))="12" Then 'Increment to next year a month early (ie 1st December) currentYear = currentYear + 1 end if if To_Year > currentYear Then To_Year = currentYear end if %><% cmd.CommandText = "dbo.getAirReg_By_Date" cmd.CommandType = 4 'adCmdStoredProc cmd.Parameters.append cmd.createParameter("@From_Month", 200 , 1, 2, From_Month) cmd.Parameters.append cmd.createParameter("@From_Year", 200 , 1, 4, From_Year) cmd.Parameters.append cmd.createParameter("@To_Month", 200 , 1, 2, To_Month) cmd.Parameters.append cmd.createParameter("@To_Year", 200 , 1, 4, To_Year) 'Execute the stored procedure Set RS = cmd.Execute %> <% If NOT RS.EOF Then %>

Aircraft Register Amendments

Reg
Mark
Action Man. Model Serial No MCTOW
(kg)
Name and Address Class Action
Date
Effect
Date
Prev. Mark DeReg. Reason
<%=RS("Registration_Mark")%> <%=RS("Register_Action")%> <%=RS("Model_Manufacturer")%> <%=RS("Serial_Number")%> <%=RS("MCTOW")%> <%=RS("Owner_Name_Address")%> <%=RS("Aircraft_Classification")%> <%=RS("Reg_Date")%> <%=RS("Reg_Eff_Date")%> <%=RS("PrevMark")%>  <%=RS("DeRegistration_Reason")%> 
<%else%>

Sorry NO Amendments for that Period

<%end if 'bad parameters else%>

Sorry NO Amendments for that Period

<%end if%>

back