UpdateDirectFixed.mdb (advanced) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 15 Jul 2008 at 11:40pm |
Please consider donating $1 per sample downloaded, find out why here.
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. Download
Access 97 (111 KB): uploads/5/UpdateDirectFixed97.zip Access 2000 DAO (117 KB): uploads/5/UpdateDirectFixed2k.zip |
|
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |