Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools


Tuesday, February 14, 2012

ExecuteScalar(),ExecuteNonquery(),ExecuteReader()

There are basically three methods provided by ADO.Net to work with database in asp.net.

Thease are as follows


1-ExecuteScalar()-
- The return type of ExecuteScalar() method is Object type.

- It will used to return a single value.

2-ExecuteNonquery()-
- The return type of ExecuteNonquery() method is Integer type.

- It will used in case of insert,update,delete statement.


3-ExecuteReader()-
- The return type of ExecuteReader() method is sqldatareader type.

- It will return multiple values i.e select statement.

You can also check a very good article on Difference between Abstract class and Interface.




0 on: "ExecuteScalar(),ExecuteNonquery(),ExecuteReader()"