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 are the data providers used in ado.net

1017


Why do we use sqldataadapter?

947


What are two important objects of ADO.Net?

1016


Can we create Synonymns in MS Acess,My Sql Server,Sql Server? But iam we can create in oracle!

2137


What is difference between datatable and dataset?

1054


What is difference between datareader and dataadapter?

1045


Where is adodb dll located?

962


What is a sqldataadapter?

996


What are the advantages and disadvantages of using datalist?

1078


Is datareader faster than datatable?

962


What is ado and rdo?

901


What is the return type of executescalar?

1012


What are the several execute methods of ado.net?

928


What is the use of Dataview?

1126


how to create a quiz software using 4 options to answer and how to check with answers in the database and award marks....

4444