ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transfer data from XL into Access: best practice (https://www.excelbanter.com/excel-programming/332800-transfer-data-xl-into-access-best-practice.html)

quartz[_2_]

Transfer data from XL into Access: best practice
 
I am using VBA in Office 2003 on Windows XP.

I'm working with some legacy code that is using ODBC (ADO) to transfer ~8000
records by ~6 fields from an Excel sheet into an Access table. This procedure
takes ~10 minutes. I want to improve its efficiency.

I know there are several methods for programmatically doing this, but what
is the fastest (ODBC or JET or what)?

1. Is there still (in 2003) no equivalent to "CopyFromRecordset" into an
Access table or must I still loop thru each field to move the data using this
type of technology?

2. Is there some other alternative that is faster, such as a programmatic
copy/paste that is more expedient?

If there is an alternative to the standard loop thru, could someone please
post example code? Thanks for your input.

Tom Ogilvy

Transfer data from XL into Access: best practice
 
Why not automate Access and use the import feature.

--
Regards,
Tom Ogilvy


"quartz" wrote in message
...
I am using VBA in Office 2003 on Windows XP.

I'm working with some legacy code that is using ODBC (ADO) to transfer

~8000
records by ~6 fields from an Excel sheet into an Access table. This

procedure
takes ~10 minutes. I want to improve its efficiency.

I know there are several methods for programmatically doing this, but what
is the fastest (ODBC or JET or what)?

1. Is there still (in 2003) no equivalent to "CopyFromRecordset" into an
Access table or must I still loop thru each field to move the data using

this
type of technology?

2. Is there some other alternative that is faster, such as a programmatic
copy/paste that is more expedient?

If there is an alternative to the standard loop thru, could someone please
post example code? Thanks for your input.




quartz[_2_]

Transfer data from XL into Access: best practice
 
Okay, I like the sound of that. But, I'm not familiar with it. Do you have
any example code Tom?

"Tom Ogilvy" wrote:

Why not automate Access and use the import feature.

--
Regards,
Tom Ogilvy


"quartz" wrote in message
...
I am using VBA in Office 2003 on Windows XP.

I'm working with some legacy code that is using ODBC (ADO) to transfer

~8000
records by ~6 fields from an Excel sheet into an Access table. This

procedure
takes ~10 minutes. I want to improve its efficiency.

I know there are several methods for programmatically doing this, but what
is the fastest (ODBC or JET or what)?

1. Is there still (in 2003) no equivalent to "CopyFromRecordset" into an
Access table or must I still loop thru each field to move the data using

this
type of technology?

2. Is there some other alternative that is faster, such as a programmatic
copy/paste that is more expedient?

If there is an alternative to the standard loop thru, could someone please
post example code? Thanks for your input.






All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com