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...

Execute nonquery returns no. of afected rows.So if my stored
procedure hav lot of select stmnt, delete stmnt, insert
stmnt..then what does execute nonquery returns in this case?

Answer Posted / sandyni

Execute nonquery effects only for DML like Update delete
and insert statements only,

for select statement we have to choose ExecuteScalar or
ExecuteReader methods. these methods can return datareader
and gives the result for your query.

Is This Answer Correct ?    18 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What provider ado.net use by default? Explain the role of data provider in ado.net? What is the role of data provider in ado.net?

988


Which database is the ado.net sql connection object designed for?

1045


What is data access pattern?

941


Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.

1015


Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?

1149


Explain ado.net features? Benefits? Drawbacks?

1052


Explian About DataAdapters

1027


What is data view and variable view?

918


What is difference between dataset and datatable?

1177


What is a datareader object?

1099


If we are not returning any records from the database, which method is to be used?

1329


Which namespaces are used for data access?

1212


How would you connect to a database by using .NET?

939


Describe ado.net object model in detail.

997


Does entity framework use ado.net?

983