UpdateDirectFixed.mdb (expert)

Please consider donating $1 per sample downloaded, find out why here
Access 97 (111 KB)

This sample illustrates how to programmatically update a table directly from a FIXED WIDTH text file. The scenario is that there must be a file called "ShoeImportFixed.txt" in the same drive as the database. You can create this file by clicking the "Export Table to Text File" button. There MUST be an Import Spec created for the text file. There is an existing Spec called "FixedShoeImportExportSpecification". This Spec is used to in the query "qryFixedWidthSpec" to read the filenames and spacing of the import file.

This query uses the two hidden System tables: "MSysIMEXSpecs" and "MSysIMEXColumns", which together hold the Specification information. Thus the program is not hard coded for a specific spec. It reads the number of fields, their names, and the spacing from the file spec and uses it in the code.




Need Winzip?

Return to Main Page