Summary

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.




Mastering C# Database Programming
Mastering the SAP Business Information Warehouse: Leveraging the Business Intelligence Capabilities of SAP NetWeaver
ISBN: 0764596373
EAN: 2147483647
Year: 2003
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net