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...

what is Execute NOn Query?

Answer Posted / nandu

ExecuteNonQuery

Use: when we are talking about a single database record - in Update, Insert, Delete and Get by Id. In all these cases we can use input/output/input-output parameters. Please note that from the application architecture point of view it is also good practices when your Insert and Update stored procedure returns changed record exactly like Get By Id method does.

Conclusion

Always use ExecuteNonQuery except: when you have a set of records - use ExecuteReader and when you have a single output value that cannot be defined as a parameter - use ExecuteScalar. Hope this helped to clarify something.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ado in agriculture?

885


What are the different methods available under the sqlcommand class to access the data?

996


What is a sqldataadapter?

945


Explain the various objects in dataset.

934


What is data reader in ado.net?

951


What are the benefits of ADO.NET?

1060


What is executenonquery ado.net?

889


What are the namespaces used in ADO.Net to connect to a database?

1103


What is ado.net architecture?

875


can we create synonymn in ms access,sql server,my sql if so explain me with example

2023


Is ado.net dead?

949


Explain the advantage of ADO.Net?

936


How can I retrieve two tables of data at a time by using data reader?

930


Explain all the classes those are used for database connections between sql server and asp.net?

949


What are the benefits of using ado.net?

944