Declaring and Using Recordsets

It's when you begin using recordsets that you start making significant claims on your system's resources. As Chapter 9 mentioned, SQL queries both are powerful and make relatively efficient use of processors and memory. Whenever you reasonably can use a SQL query to append data, or to update data, or to select and display data, by all means do so.

But queries are bludgeons. They don't do well in situations that call for branching and looping, for example. The more complicated the logic that you must bring to bear on the data, the less attractive a SQL query looks.

Recordsets, on the other hand, enable you to use more delicate tools. You can use the extensive capabilities of VBA when you work with recordsets—and ...

Get Managing Data with Microsoft® Excel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.