Summary

This chapter explains the Command object and its use of Parameter objects to help you understand how to execute different types of commands and pass parameters to stored procedures. After reading this chapter, you should be able to fully understand how commands are executed using ADO and the following key points about their execution:

  • Although Command objects can be created independently of other ADO objects, they still need to connect to a data source.

  • Commands can be executed with the Command object, the Recordset object, or the Connection object.

  • Specifying parameters ahead of time can significantly increase performance when executing commands.

  • Asynchronous execution of commands allows applications to continue processing while ADO and the data provider continue to work in the background of the client machine or on a server.

The next chapter of this book, Chapter 8, explains how to use the Errors collection of the Connection object, which contains all of the Error objects for specific failures of the data provider.

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.