LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default CopyFromRecordset with large amount of data

Hi, all,

I am trying to load a spreadsheet (OWC) on my ASP page directly from the
RecordSet.

However, since the returned recordset can be huge, I will only load the
spreadsheet with first 1000 rows, if users choose to see the next 1000 rows,
I will load the next 1000 rows - pretty much treating the spreadsheet as a
list box but with Excel functions.

I do by something like this:

rs.CursorLocation = 3 'adUseClient
rs.CursorType = 1 'adOpenKeyset
rs.LockType = 3 'adLockOptimistic
rs.PageSize = 1000
rs.Open sSQL, Cnn
SS1.ActiveSheet.Cells.copyFromRecordset rs,1000
And this has been successful. But when I try to load the next 1000 rows, it
still displays the first 1000 rows. I do this by:

rs.AbsolutePage = 2
SS1.ActiveSheet.UsedRange.ClearContents
SS1.ActiveSheet.Cells.copyFromRecordset rs,1000

I check the recordset before the "copyFromRecordset" method, and the
recordset is at the correct position. But the "copyFromRecordset" seems to
ignore it, and load the spreadsheet from the BOF of the recordset.
Anyone knows about this? Thanks.

 
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
Reformating large amount of data Jason Excel Discussion (Misc queries) 2 April 10th 08 10:41 PM
Excel2007's performance over large amount of data( over 500,000 - 1M) sunzj Excel Discussion (Misc queries) 1 August 2nd 07 08:20 PM
Changing large amount of Data glnbnz Excel Discussion (Misc queries) 5 January 12th 07 07:44 PM
Large amount of data for plotting dharshanie Charts and Charting in Excel 7 May 24th 06 05:08 PM
looping through and organizing a large amount of data Erik Excel Programming 4 September 6th 04 05:05 PM


All times are GMT +1. The time now is 02:01 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"