Import extrenal data exceeds 65536
Jamie:
I thought you might find this interesting.
"the db I used here is trash, just one I use to play around with
to many dups ect to be of value or to share 1 table 3 fields
thats why I couldn't set the value at 65+"
I wrote a simple select query in Access
"SELECT DISTINCTROW TOP 30500 Products.ProductID,
Products.ProductName, Products.UnitPrice FROM Products;"
Called the query from excel with the connection object,
used CopyFromRecordset to write it into a sheet it took
1.3 sec
Using the same select statement and CopyFromRecordset in excel
to write to a sheet it took
.59 sec
using a loop
strSql = "SELECT Products.ProductID, Products.ProductName,
Products.UnitPrice FROM Products;"
With Rs
.MoveFirst
Do Until irow = 30502
Worksheets("Sheet3").Range("A" & irow) = Rs("ProductID")
Worksheets("Sheet3").Range("B" & irow) = Rs("ProductName")
Worksheets("Sheet3").Range("C" & irow) = Rs("UnitPrice")
14.4 sec
So I guess my premise to do as much as you can at the db level
don't mean much. But, then what the hell, this is just a hobby.
Have a happy thanksgiving
TK
|