ADO supports three data-access models. The term "data-access model" refers
to the choice of technique that you use in your program to request the data provider
to return data to a Recordset or to execute some action on the data.
Following are brief descriptions of each of the three data-access models covered
in the chapter:
The Execute Direct model enables
you to dynamically specify a SQL data-access statement every time you access data.
The underlying provider then executes your statement to return the requested result
or manipulate the data.
The Prepare/Execute model also enables you to dynamically
specify a data-access statement. The first time that you run the statement, the
underlying provider compiles your statement as a temporary stored procedure (whose
lifetime lasts as long as its associated Connection). The provider then executes
the temporary stored procedure. On subsequent requests to run the same statement
during the lifetime of the Connection, the provider runs the temporary stored
The Stored Procedures model requires you to use an
existing stored procedure that already belongs to the data that you are accessing.
The following sections discuss each of the three models in greater detail,
as well as the reasons you might have for choosing a particular data-access model
over the other two.