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 query string with example?

1023


Do you know using sql cache invalidation?

1081


How can you display all validation messages in one control?

1040


What is syntax code to send email from an asp.net application?

1066


What is a page life cycle?

1103


What's the use of response.output.write()?

1312


What r the asp.net list controls and difference between them?

1092


Which validator control you use if you need to make sure the values in two different controls matched?

1111


If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?

2534


What is validation in asp.net?

1145


What is meant by server side scripting?

1010


Is viewstate secure?

1013


What is the use of execute non query in asp.net?

1025


In order to get assembly info which namespace we should import?

1049


Which object wraps the state or data of a user?

1052