Wednesday, September 07, 2005

[VBScript] Sorting agonies

After hours spent trying this algorithm and that algorithm, trying Bubble sort (too slow for my massive datasets), QuickSort (which dies from lack of stack space), and ShellSort (which runs at least), I finally stumble over something completely different: Sorting Data by Using a Disconnected Recordset.

After you read the Microsoft blurb, check out what DevGuru has to say about .Sort: PROPERTY: Recordset::Sort.

It's good, but sometimes it seems I spend ages looking for something on the 'net, implementing what I find and then stumble over what I needed in the first place when looking for something else. Aarrrgghh!

To cap the whole episode off, I find I don't need a sort at all! Access will actually protect its indexes whether I "SELECT * FROM" or whether I "SELECT TOP 1 * FROM".

"I'm a teapot, I'm a teapot ..."

No comments: