Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between ExecuteReader,ExecuteNonQuery
and ExecuteScalar.

Answer Posted / jerry joseph

ExecuteReader - This method returns a DataReader which is
filled with the data that is retrieved using the command
object.

ExecuteNonQuery - This method returns no data at all. It is
used majorly with Inserts and Updates of tables.

ExecuteScalar - Returns only one value after execution of
the query. It returns the first field in the first row.

This would be excellent for receiving a count of records
(Select Count(*)) in an sql statement, or for any query
where only one specific field in one column is required.

Is This Answer Correct ?    35 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a uri query?

960


is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?

2376


How Session use Cookies in State Management?

1002


Explain difference betn dataset and recordset?

888


What is viewstate in asp net with example?

949


Explain the difference between an exe and a dll?

960


What are the asp.net 2.0 features?

965


Explain security types in asp.net?

1047


What are the advantages of Web API?

1050


What is postback and autopostback in asp.net?

973


Describe paging in asp.net?

1102


What is the difference between ASP.NET Webforms and ASP.NET MVC?

1080


Explain how can we inherit a static variable?

1000


Can we set master page as a start page?

977


What is _dopostback in asp net?

922