The following sections provide descriptions of additional Connection object properties and methods.
The Connection object’s Execute method lets you execute selection and action queries. If you execute the method using a selection query, the system returns a recordset (see Chapter 13, “ Recordset Objects”) that always presents the settings adOpenForwardOnly and adLockReadOnly.
This method is more interesting for executing action queries, which modify data. The following small program prompts the user for an action query name or a SQL text and then processes the query. The program returns the number of records that were edited as a result of the query:
Sub ConnectionExecute() Dim strQry As String ...