O'Reilly logo

Microsoft® Access Projects with Microsoft SQL Server™ by Natascha Nicol, Ralf Albrecht

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other Properties and Methods

The following sections provide descriptions of additional Connection object properties and methods.

The Execute Method

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required