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 the use of SqlCommand object?

1169


What is the role of the dataset object in ado.net?

1056


Why is stored procedure used in ado.net?

1029


What is ado.net connection?

907


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

947


What are the features of ado.net?

951


What is the difference between sqlcommand and sqldataadapter?

947


What is the difference between DataReader and DataSet in ADO.NET?

1078


Does sqlclient and oledb class share the same functionality?

875


What is ado.net and its architecture?

1073


How to add an aggregate column?

941


What is oledb connection?

931


What is the namespaces being used to access oracle database?

989


Define the executescalar method?

877


Define data access layer?

900