Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - UpdateDirectFixed.mdb (advanced)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Please consider donating $1 per sample downloaded, (find out why here)

UpdateDirectFixed.mdb (advanced)

 Post Reply Post Reply
Author
Message
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 20 Feb 2008
Status: Offline
Points: 249
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: UpdateDirectFixed.mdb (advanced)
    Posted: 15 Jul 2008 at 11:40pm
 
Please consider donating $1 per sample downloaded, find out why here.
 
UpdateDirectFixed.mdb
 
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
Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down