1

Topic: ADODB CopyFromRecordset

All good afternoon!
I do outswapping from a DB in Excel
If result  the order 500 lines all is preempted normally.
At  to sampling the error takes off that there is no storage at line:
Sheet. Range ("A1").CopyFromRecordset rs
Real sampling of the order of 5 million lines.
It is possible to envelop somehow in a cycle that on an one million floor wrote down, saved in a file and  further?
P.s. c VB for the first time. I do with the help hta
Thanks

2

Re: ADODB CopyFromRecordset

Moss;

Const RECORDS_PER_ITERATION = 500000
Dim r
REM rs - adodb.recordset
Do Until rs. EOF
Set r = ' appropriate a variable the beginning of a range for outswapping
REM Function CopyFromRecordset (Data As Unknown, [MaxRows], [MaxColumns]) As Long
r. CopyFromRecordset rs, RECORDS_PER_ITERATION
Set r = Nothing
REM save a file, or do other actions which as you consider, rescue from Out of memory
Loop