|
|
In this chapter, you learned how to execute database commands. There are three Command classes: SqlCommand, OleDbCommand, and OdbcCommand. You use a Command object to execute a SQL SELECT, INSERT, UPDATE, or DELETE statement. You can also use a Command object to execute a stored procedure call, or retrieve all the rows and columns from a specific table; this is known as a TableDirect command. You use an object of the SqlCommand class to execute a command against a SQL Server database, an object of the SqlDataReader class to read the rows retrieved from a SQL Server database, and an object of the SqlTransaction class to represent a database transaction in a SQL Server database.
In the next chapter, you'll learn the details of DataReader objects.
|
|