LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default What is the fastest way to pull a recordset using ADO to Oracle.

Try this, rsData is my ADODB connection to a SQL database but I think it
would work the same for your purposes.

..Range("A4").CopyFromRecordset rsData

Then process this, read that recordset back into a variant array (2d) and
process it that way making any changes then repopulate the cells from the
changed array. (MUCH faster then looping through the cells). It might be
possible to use the .MoveNext type commands to loop through the recordset
building the 2d array that you then send to the worksheet.

Dim vaArray as Variant
vaArray = Range("A1:C100").value 'loads a 2d array from the cells
....process array...
Range("A1:C100").value = vaArray 'Replaces the cells with the 2d array data.

HTH
--
Regards,
John


"Gummy" wrote:

Hello,

I am connecting to an Oracle 9i database through ADO. I loop through the
rows and columns in Excel and pass those parameters to a query which returns
a single value and places it in the appropriate cell. This works fine, but
is awful slow and I have lots and lots of cells to fill.

My question is: Instead of pulling a singe value and placing it in the cell,
would it be faster to pull several values (a larger recordset) loop through
that recordset and place the values in the appropriate cell?

I don't know if the Seek method is faster on a recordset of several values.
Maybe it would be faster to drop the recordset into a tempory sheet and loop
through those values? Or is there a completely better way to do this?

Thank you in advance for any suggestions.

-Gummy



 
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
Connect to Oracle using Microsoft ODBC for Oracle Kent Excel Programming 2 January 18th 06 03:53 AM
Fastest way to enter many formulas ob3ron02[_15_] Excel Programming 0 October 27th 04 05:08 PM
Fastest way of getting data into excel jnc[_2_] Excel Programming 4 May 26th 04 02:06 PM
Type recordset/recordset? FlaviusFlav[_9_] Excel Programming 4 May 24th 04 12:16 PM
Fastest way to do this? Abu Ali Excel Programming 4 January 12th 04 09:24 AM


All times are GMT +1. The time now is 07:45 PM.

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"