Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help - How many different type of Command Method in ADO.NET
Blog
 
# Friday, July 03, 2009

ExecuteNonQuery() Executes non-SELECT commands, such as SQL commands that insert, delete, or update records. The returned value indicates the number of rows affected by the command. You can also use ExecuteNonQuery() to execute data-definition commands that create, alter, or delete database objects (such as tables, indexes, constraints, and so on).

ExecuteScalar() Executes a SELECT query and returns the value of the first field of the first row from the rowset generated by the command. This method is usually used when executing an aggregate SELECT command that uses functions such as COUNT() or SUM() to calculate a single value.

ExecuteReader() Executes a SELECT query and returns a DataReader object that wraps a read-only, forward-only cursor.

Friday, July 03, 2009 12:14:25 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]   Interview Question ADO.NET  | 
Comments are closed.
Copyright © 2010 SoftwareCodeHelp. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: