The Execute Method

This method executes the text contained in the Command object's CommandText property. The Execute method has the following syntax for an action query (one that does not return a resultset):

command.Execute [RecordsAffected], [Parameters], [Options]

And for a select query:

Set Recordset = command.Execute([RecordsAffected], [Parameters], [Options])

The RecordsAffected and Options arguments are identical to the corresponding arguments for the Connection object's Execute method, described in the "Connection Object Methods" section. If you are executing a SQL statement that requires one or more parameters to be passed, you can supply an array of values to the Parameters argument, one for each parameter required.

0 0

Post a comment