***** Sample Import Database *****
The Database IMPFIXED.MDB is a sample database provided from Microsoft Technical
Support as is.  All code and ideas are free to use, modify and distribute.

The idea for this database is to provide examples of how to import large fixed-width
or Comma Separated field text files using Transactions, to avoid issues regarding
the Maximum transaction limits within Access 1.x.

***** More information *****
TABLES:

3 Sample tables are supplied along with empty structures to rebuild them with:
Family Members, People, and Places.

Tables:  Bad Field List and Temp are used within code to track import information.

The functions make use of the system tables:

Table Name        To get 
----------	  ------
MSysObjects   	  The list of the Tables that are available in the database
MSysIMEXSpecs	  The list of Import Export Specifications
MSysIMEXColumns   The list of Fields for Fixed Width Specifications.


QUERIES:

The queries:
! Clear Bad Field List
! Clear Temp

are used to clear out the records from the previous import logs every time a new
import is run.

The other queries are used in the code examples to get information about the import
specification and the table that is being imported into.


FORMS:

Only one form "Import Form" is provided.  This is a sample form created to
make testing the modules a little easier.  All the data must be entered for a
Fixed Width Import, no specification is necessary for a Comma Separated Value import.


MODULES:

Import Any File is the main import engine module.  

FileImportDelimited: 	This function will import a Comma Separated Value file, 
			(even one that contains multiple lines per record).
			This function must be modified to meet the needs of the
			file you are trying to import.

FileImportFixed:	This function will import a Fixed Width File that meets
			an Import Export Specification within the database.

Each of these functions has a main section that does the actual importing.  Much
of the code before that section, does error checking to verify that the file
exists, the table exists and the specification is valid for the table.

The rest of the functions are support for these main functions.  


Test Import Functions supports the "Import Form" and calls the appropriate File
import function.  It also uses a call to COMMDLG.DLL to get the name of the 
file to import.


TRYING IT OUT:

To test the Modules import the PLACES.TXT file to the Places table using the 
"FXD: Places Spec" specification.  This is an example of a Fixed Width Import.

Then import the PEOPLE.CSV file to the People table. (Note: no specification
is necessary.)  This is an example of a Delimited or Comma Separated Value
Import. 


NOTES AND COMMENTS:

I hope that this database will provide an example that will be useful to you.  I
spent a few sleepless nights trying to make it bullet proof.  The delimited
import was the one that got me stuck.  Actually it turned out easier when I 
decided not to make it as generic as the fixed width import.  Then later I
was able to update it to be able to import any table without user modification
to the code.

If you have any comments or question on any of these examples please post a 
message in the Import Export Section of the Microsoft Access Forum on CompuServe.
I'm willing to show you what to modify to make it work for you... but not until
you understand how it works... OK?

Thanks,
Gary Yukish
Microsoft Access PSS
CIS ID: [72420, 1356]
