S
SirPoonga
What would cause this error?
I have a VBA script that is taking a text file dumped from a mainframe
and converting it to tables. Each line of the text file is a record
that could be of different types. The fields are specified in a
layout at what character the field starts and ends in the line. I have
the record type and layout information stored in a table. The table
has fields - record_type, field_id, field_start, field_end,
field_description. Pretty self explanatory.
The basic algorithm goes as such.
Form to input text file location/name and where the record type starts
and ends.
Loop through the each line of the file.
Extract record type
Run a query to grab the record layout information from the layout table
based on record type. (Should I make some sort of datatype to store
this ahead of time so I don't query as much?)
Go through the recordset and grab the field_id, field_start, field_end.
Extract the field from the line.
Fields stored in a comma delimitted string.
Once all fields are extracted execute an INSERT into the appropiate
table.
Repeat until done.
The text file I have to go through is about 330megs, almost 1 million
lines.
I'm thinking the only way I could really save resources is by not
querying so much and storing the record layout info in some type of
data structure.
I have a VBA script that is taking a text file dumped from a mainframe
and converting it to tables. Each line of the text file is a record
that could be of different types. The fields are specified in a
layout at what character the field starts and ends in the line. I have
the record type and layout information stored in a table. The table
has fields - record_type, field_id, field_start, field_end,
field_description. Pretty self explanatory.
The basic algorithm goes as such.
Form to input text file location/name and where the record type starts
and ends.
Loop through the each line of the file.
Extract record type
Run a query to grab the record layout information from the layout table
based on record type. (Should I make some sort of datatype to store
this ahead of time so I don't query as much?)
Go through the recordset and grab the field_id, field_start, field_end.
Extract the field from the line.
Fields stored in a comma delimitted string.
Once all fields are extracted execute an INSERT into the appropiate
table.
Repeat until done.
The text file I have to go through is about 330megs, almost 1 million
lines.
I'm thinking the only way I could really save resources is by not
querying so much and storing the record layout info in some type of
data structure.