VBA Usage

An example using the code to execute SQL asynchronously and write it out to different sheets. In effect, the execution time is nearer to the execution time of the slowest command object, rather than being the sum of execution times.

Some Notes:

The data classes used above can be used instead of the ones below if you only want to execute SQL and collect data

The classes below both retrieve data and write it out to sheets

Some fields in the code below are global parameters as string for server instance, database name and timeout, prefaced by gstr, which can be passed in as variables instead

Each item will execute independently, and do not need to be pointing at the same server/database