I'm importing a txt-file to an SQL-server db via Access (linked files). I
therefore use ado, with of course the addnew method of a recordset opened
with CurrentProject.Connection, adOpenDynamic, adLockOptimistic
I now see the addnew is extremely slow. Output is several millions of rows,
so it's taking hours if not days to run.
Is there any way I can change this to a more performant solution?
Tanx in advance !
D
I'd think an append query. Here's an example.
http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/
In addition to the Append query already suggested:
SQL Server has its own features for importing data, most notably SSIS
= SQL Server Integration Services. You can kick off an SSIS package
using VBA. Not exactly simple, but doable.
BCP = Bulk Copy Program is another SQL Server tool to look into.
-Tom.
Microsoft Access MVP
Cheers
The Frog