Text file reading and updating database

  • Thread starter Thread starter Accessde
  • Start date Start date
A

Accessde

I need to write a module to read thru
the file and update access tables for each record type
with in the file
The length of the fields are different in each record type.
Record type 01 will go into one table,record type 02 into
another table. There can be duplicate records types.I
cannot have a delimited file becoz of records are of
different length. I have to read by the record type and
update the tables in access.
Revised example

record type 01
first 2 position : 01
next 9 postions : ssn
next 8 postions : date
example : 0112345678920040104

record type 02:
first 2 positions: 02
next 8 positons : start date
next 8 postion : end date

example :

like..wise..more record types..

0112345678920040104
022004010420041004
03......................
04.........................

....

Hope this is clear..an example of reading a text
file by each record and updating access tables will help
me get going.
 
Accessde said:
I need to write a module to read thru
the file and update access tables for each record type
with in the file
The length of the fields are different in each record type.
Record type 01 will go into one table,record type 02 into
another table. There can be duplicate records types.I
cannot have a delimited file becoz of records are of
different length. I have to read by the record type and
update the tables in access.
Revised example

record type 01
first 2 position : 01
next 9 postions : ssn
next 8 postions : date
example : 0112345678920040104

record type 02:
first 2 positions: 02
next 8 positons : start date
next 8 postion : end date

example :

like..wise..more record types..

0112345678920040104
022004010420041004
03......................
04.........................

...

Hope this is clear..an example of reading a text
file by each record and updating access tables will help
me get going.


Here's a bunch of code that might take care of a lot of what
you want. At least it will be an extensive example:

http://www.mvps.org/access/modules/mdl0057.htm
 
Back
Top