MS Access for the Business Environment: Analyze and Report from the Windows Event Log, Part II - Page 3
April 5, 2004
The Import Text Wizard dialog appears, with part of the contents of our log file appearing as a sample, and the Delimited radio button selected by default, as depicted in Illustration 6.
Click for larger image
13. Click Next.
We arrive at the second dialog of the Import Text Wizard, where we can view a preemptory layout of the file, with the default selection of Comma as delimiter type, and the quotation mark (") as the Text Qualifier. We can scroll over and down to ascertain that the delimiting scheme is adequate for our immediate needs. The second dialog of the Import Text Wizard appears as shown in Illustration 7.
Click for larger image
Because we wish to be able to use "dates as dates" and "times as times" in our analysis of the log data later, we can ensure that "translation" of the imported data to the correct data types occurs here. This will save us the task of changing the data types (they would largely be imported as text, by default) after creation of the table.
14. Click the Advanced button.
The Import Specification dialog for our file appears. Here we can manage the data type conversions that are enacted upon the text fields we import.
15. In the Field Information table in the lower half of the Import Specification dialog, type the titles from each Data Element column of Table 1 above into the respective Field Name column.
16. Change the Data Type to Date/Time for the first two rows, Date and Time, using the selector in the respective Data Type fields. Leave the settings for this field at their defaults for the remaining rows.
The Import Specification dialog, with our modifications, appears as shown in Illustration 8.
17. Click Save As.
The Save Import / Export Specification dialog appears. This offers us the opportunity to save our data type specifications for re-use in subsequent imports of the log file we are importing.
18. Type the following into the Specification Name box of the dialog:
App Log Import Specification
The Save Import / Export Specification dialog appears as depicted in Illustration 9.
19. Click OK.
We are returned to the Import Specification dialog, which now bears the name that we have saved.
20. Click OK to return to the second dialog of the Import Text Wizard.
21. Click Next.
22. Ensure that the In a New Table radio button is selected in the third dialog of the Import Text Wizard that next appears, as shown in Illustration 10.
23. Click Next.
The fourth dialog of the Import Text Wizard appears next, as shown in Illustration 11.