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.
Printed Date: 25 Sep 2020 at 5:01am
Software Version: Web Wiz Forums 12.03 -

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, - 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.

Access 97 (111 KB): - uploads/5/
Access 2000 DAO (117 KB): - uploads/5/

Consider donating $1 per sample downloaded," rel="nofollow - find out why here .<

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 -
Copyright ©2001-2019 Web Wiz Ltd. -