ADO » Command » Prepared

commandobject.Prepared = Boolean
Boolean = commandobject.Prepared

Sets or returns a Boolean value that indicates whether or not the provider is to save a compiled version of a command before it is executed.

The Prepared property sets or returns a Boolean value (True or False) that specifies whether or not to save a compiled version of a Command object before it is executed for the first time.
If True, the compiled version is saved before the first execution and all subsequent executions involving this same Command will usually process faster. This improved performance is very beneficial if you need use the same Command objects (albeit with different parameters) more than once.
However, a stored procedure can even be more efficient for a large number of repeated executions of the same Command. Further, the amount of available memory will have to be considered, since each Prepared statement will have to be stored in a temporary database.
If False, the Command object is executed without creating a compiled version. The default is False.


Set objCommand.ActiveConnection = objConnection
objCommand.Prepared = True

See Also: