The Command object enables you to execute queries against your data source. However, in order to retrieve data, you must know the schema of your database as well as how to build a valid SQL query. In Hour 3, you learned how to build SQL queries to retrieve and modify data. You will now have the opportunity to apply that knowledge as you use the Command object.
The SqlCommand object must be used in conjunction with the SqlConnection object. If you attempt to attach a SqlCommand to an OleDbConnection, you will get an error from the compiler. The converse is also true: OleDbCommands cannot be used with the SqlConnection.