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

How to read data with the sqldatareader ?

1031


What are all the different methods under sqlcommand?

1031


Define isolation?

1027


Is datareader faster than datatable?

1020


Why is it important to close an ado.net application?

1078


How do you connect to sql server database without using sqlclient?

1176


What is the difference between a datareader and a dataset?

1103


What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)

1061


Which keyword is used to accept variable number of parameters?

1170


What is partial class?

1026


What is serialization and de-serialization in .net? How can we serialize the dataset object?

1020


Which is better entity framework or ado.net?

1124


What are the advantages using ado.net?

1090


differences between ADO and ADO.NET

1130


What is Data view?

1152