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

How to generate a single aggregate?

1023


What are different layers of ADO.Net?

1146


What is ole access?

1000


What is disconnected scenario in entity framework?

1168


How to identify the controls which can be used for binding data?

1046


What is the full form of ado.net?

1036


Explain the namespaces in which .net has the data functionality class.

1158


What is the role of clr?

1001


Define isolation?

1027


How to check if the Dataset has records ?

1056


What are the advantages using ado.net?

1088


Explain the difference between sqlcommand object and command behavior object?

1155


What is ado oledb and odbc?

986


What is namespace in ado.net?

1080


Explain sqlconnection object?

1067