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

What is dao and ado?

924


How do we use stored procedure in ADO.NET and how do we provide parameters to the stored procedures?

966


List the 4 common ado.net namespaces?

1165


Why is ADO.NET serialization slower than ADO ?

1048


What is basic use of data view?

1003


What is serialization and de-serialization in .net?

927


What is the difference in record set and dataset?

1027


Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.

1107


What is a sqldataadapter?

997


How can we add/remove row's in "datatable" object of "dataset"?

1021


What is ole word?

946


Explain how to find the given query is optimised one or not?

1027


Explain ODP.net

1002


Explain the different row versions available in table?

1059


Which is better entity framework or ado.net?

1046