Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The Command object performs one of three tasks. First, it can query the data source and return a Recordset object. By giving the Command object the name of a parameterized query, a stored procedure, or even a table, the Command object can execute instructions and return to your application a Recordset object with the results of the operation. Although we have learned to pass SQL statements and open tables with other objects from ADO (e.g., Recordset objects), as we will soon learn, the Command object is the only object that can use Parameter objects.
Second, the Command object can execute bulk operations such as an UPDATE or INSERT INTO SQL statement. Again, the Recordset object can provide the same functionality, but the Command object will allow the persistence of its command text for re-execution, unlike the Recordset object.