LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default CopyFromRecordSet extremely slow

....more Info, maybe a solution:

1) I turned off screenupdating and I have calculation set to manual with not
positive effect.

2) when I import the tables into Access my queries are extremely fast
(compared to the linked tables)

Copyfromrecordset is slow when I use linked tables and fast if I use "real"
tables? Why does copyfromrecordset depend on where I get my data from??


3) So, there appears to be something wrong with the connection, I used this
one:

rs.Open sqlstring.Value, cn, adOpenStatic, adLockOptimistic

and replaced it with this one:

rs.Open sqlstring.Value, cn, adOpenStatic, adLockReadonly

I would also use adOpenForwardOnly, however, then rs.recordscount does not
work anymore and I do not know how many records I received. Maybe there's no
impact on performance.

Now I am within 2 or 3 seconds for my 1000 records :)

Strange, isn't it?

arno


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Extremely Slow KMH Excel Discussion (Misc queries) 2 June 30th 09 01:27 PM
Opens extremely slow DrYauney Excel Discussion (Misc queries) 0 July 16th 07 07:22 PM
Extremely slow macro CLR Excel Programming 3 January 17th 07 06:58 PM
EXTREMELY slow toolbars? Maury Markowitz Excel Programming 0 May 23rd 06 04:17 PM


All times are GMT +1. The time now is 10:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"