extract single record from recordset

baitmaster

Well-known Member
Joined
Mar 12, 2009
Messages
2,037
I want to create a recordset that contains only a single result from a larger recordset, how can I do this?

I have a recursive algorithm that calls itself many times, passing a single record in, and getting a new set of results where one entry will be used in the next step and then passed on again. I worry that I'll fill my memory with hundreds of large datasets, some with 10k+ results, where I only ever want to use one of them. How can I store only recordset.row(x)? I know I can .moveFirst but the other records are still stored in the background aren't they?

Thanks
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

baitmaster

Well-known Member
Joined
Mar 12, 2009
Messages
2,037
Answer: ensure that I filter in the right way and the SELECT TOP 1 * FROM instead of just SELECT * FROM...
 

Watch MrExcel Video

Forum statistics

Threads
1,099,794
Messages
5,470,825
Members
406,727
Latest member
Kimze

This Week's Hot Topics

Top