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 the namespaces in which .net has the data functionality class.

1021


Define different execute methods of ADO.NET command object ?

1012


What is a serialized object?

958


Define bubbled event?

873


What is data control techniques?

903


What is ado in agriculture?

894


Why edit is not possible in repeater?

901


What is ado.net in mvc?

882


What are the data providers in ADO.NET framework?

985


What is ado recordset?

926


Explain the differences between oledb sql server, oledbdotnet provider?

959


What is ado.net architecture?

884


Which is faster entity framework or ado.net?

884


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?)

953


Which is faster ado.net or linq?

962