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 / jaya tiwari

Execute non query executes a query that is associated with
sqlCommand object . sqlCommand object having a property
sqlCommandobj.CommandText in which we pass the query. so
ExecuteNonQuery will return the no of rows affected by that
command whose sqlCommand obj invokes this method .
and it can't be use for select as its return type is int
that is no of rows affected in execution of that query

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you connect to sql server database without using sqlclient?

1007


Which keyword is used to accept variable number of parameters?

1127


How is entity framework different from ado.net?

952


What are different layers of ADO.Net?

1093


Does dapper use ado.net?

1017


Explain the difference in an abstract class and an interface?

927


differance between ADO vs ADO.Net?

1061


What is connection pooling and what is the maximum pool size in ado.net connection string?

945


What is the DataTableCollection?

1053


What are the core objects of ADO.NET?

1048


What is difference between Dataview and Datatable?

1069


What are dataproviders?

967


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

1002


How can we save all data from dataset?

1002


What is the role of data provider in ado.net?

998