S
Stephen Brooker
Hi all,
I've got a Access 2000 DB that has the option to import external data from a
CSV file. It gives the user the option of choosing a particular file, then a
VBA sub reads the file line by line, manipulates the data slightly, then
uses a INSERT command to insert the data into a temp table (permanent table
that is cleared out every time). The user can then go over the temp table
and make any changes they like before the data is transfered across to the
permanent table.
My problem is the data in the temp table has to be kept in the exact same
order as the CSV file, which it isn't. There are large chunks of data that
are perfectly in order, but the chunks themselves are all over the place.
For example, out of the last 40 or so records, 20 may be in the correct
place at the end, the other 20 may be in the middle of everything else.
There is nothing wrong with the code reading and inserting the data, so I'm
assuming it's some kind of buffering thing in Access, but I'm not sure what.
As far as I understand Access doesn't support COMMIT etc, so is there some
was to ensure that the data is written in order.
TIA
Steve.
I've got a Access 2000 DB that has the option to import external data from a
CSV file. It gives the user the option of choosing a particular file, then a
VBA sub reads the file line by line, manipulates the data slightly, then
uses a INSERT command to insert the data into a temp table (permanent table
that is cleared out every time). The user can then go over the temp table
and make any changes they like before the data is transfered across to the
permanent table.
My problem is the data in the temp table has to be kept in the exact same
order as the CSV file, which it isn't. There are large chunks of data that
are perfectly in order, but the chunks themselves are all over the place.
For example, out of the last 40 or so records, 20 may be in the correct
place at the end, the other 20 may be in the middle of everything else.
There is nothing wrong with the code reading and inserting the data, so I'm
assuming it's some kind of buffering thing in Access, but I'm not sure what.
As far as I understand Access doesn't support COMMIT etc, so is there some
was to ensure that the data is written in order.
TIA
Steve.