PDA

View Full Version : Solved: RecordSet and ListView



JKwan
06-10-2010, 11:37 AM
I was wondering is there a method (fast) that I can get a RecordSet into a ListView? There is a CopyFromRecordSet that I can use to copy the entire set into my sheet. However, with a ListView, I cannot figure out (or it is not possible). I am doing this in a loop and it is slow!

Bob Phillips
06-10-2010, 12:32 PM
There is also recordset.GetRows which drops the recodset into an array. You should be able to do something with that.

JKwan
06-10-2010, 02:50 PM
xld:
Thanks for the reply. I alter the code to use .GetRows, I don't think it is any faster, maybe a tad.
So, what I did was that I grabbed the entire set - about 6500 records by 31 columns, then using two loops to go thru the array and load it into the ListView, it is still way way slower than using CopyFromRecordSet. Maybe I am stuck with the slow load, I guess looping is really not that ideal.
Do you have more ideas?

Bob Phillips
06-10-2010, 04:29 PM
I think the problem is the ListView, I know of no quick and simple load method.

JKwan
06-11-2010, 06:08 AM
Thanks for your effort!