Print Page | Close Window

UpdateDirectFixed.mdb (advanced)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=226
Printed Date: 20 Nov 2019 at 1:59pm


Topic: UpdateDirectFixed.mdb (advanced)
Posted By: Roger Carlson
Subject: UpdateDirectFixed.mdb (advanced)
Date Posted: 15 Jul 2008 at 11:40pm
 
Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - 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):
http://www.rogersaccesslibrary.com/forum/uploads/5/UpdateDirectFixed97.zip - uploads/5/UpdateDirectFixed97.zip
Access 2000 DAO (117 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/UpdateDirectFixed2k.zip - uploads/5/UpdateDirectFixed2k.zip


-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window