DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "AmocTraffic", "ModelTraffic", True
DoCmd.DeleteObject acTable, "Amoc_ImportedTraffic"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "Amoc_ImportedTraffic", "ModelAmoc_ImportedTraffic ", True
DoCmd.DeleteObject acTable, "Amoc_InconsistentTraffic"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "Amoc_InconsistentTraffic", "ModelTraffic ", True
'--------------------------------------------------------------------------------
Step 2 - Delete AMOC flight legs from the flight table
To delete the flight legs, four tables must be emptied. These tables are:
AmocFlight.
Amoc_ImportedFlight.
Amoc_InconsistentFlight.
Amoc_ExpandedFlight.
AmocFlight is the table that will store at the end of the importing procedure the flight legs.
Amoc_ImportedFlight is a temporary table that helps with the process of importing the
flight legs.
Amoc_InconsistentFlight is the table that will store at the end of the importing procedure
all inconsistent flight legs that must be deleted.
Amoc_ExpandedFlight is a temporary table, which is used for the calculation of the
average speed and the descend/climb rate values.
Each of the tables mentioned above has a corresponding model table: AmocFlight – ModelFlight Amoc_ImportedFlight – ModelAmoc_ImportedFlight Amoc_InconsistentFlight – ModelAmoc_InconsistentFlight Amoc_ExpandedFlight – ModelFlight
These 4 tables are always empty, but they store the structure of the 4 tables described
before.
To empty the tables, the following code is used:
'--------------------------------------------------------------------------------
DoCmd.DeleteObject acTable, "AmocFlight"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "AmocFlight", "ModelFlight", True
DoCmd.DeleteObject acTable, "Amoc_ImportedFlight"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "Amoc_ImportedFlight", "ModelAmoc_ImportedFlight ", True
DoCmd.DeleteObject acTable, "Amoc_InconsistentFlight"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "Amoc_InconsistentFlight", "ModelAmoc_InconsistentFlight ", True
DoCmd.DeleteObject acTable, "Amoc_ExpandedFlight"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "Amoc_ExpandedFlight", "ModelFlight", True
'--------------------------------------------------------------------------------
Step 3 - Import AMOC traffic file
To complete this step, four other sub steps must be executed.
3.2.3.1.1. Sub step 3.1 - Importing AMOC traffic text file into the temporary table Amoc_ImportedTraffic
This first sub step implies the physical importing of the AMOC traffic text file. To do that the next code is used:
'------------------------------------------------------------------------------
DoCmd.TransferText acImportDelim, "Amoc Traffic Import Specification", "Amoc_ImportedTraffic", FileName, False, ""
'------------------------------------------------------------------------------
The "Amoc Traffic Import Specification" is a predefined mode to import the AMOC traffic text file, which’s "path\name" is stored in the FileName variable. This specification selects from the text file only the fields that the AERO2K needs and also defines each one’s date type (see Table 48).
3.2.3.1.2. Sub step 3.2 - Changing imported traffic data to AERO2K specific data type
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:AERO2K Flight Movement Inventory Project Report(48)