Go to DotNetFunda.com
 Online : 2117 |  Welcome, Guest!   Login
 
Home > Interview Questions > C# Interview Questions > What is the use of CommandBehavior.Close ...

call for mock interview

C# Interview Questions

What is the use of CommandBehavior.CloseConnection?

Author: Raja | Posted on: 5/5/2008 11:31:38 PM | Category: C# | Views:1394 |  Print | Asked In: Many Interviews


Answer:
We can use pass it with ExecuteReader method of Command object like

reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);

This will make sure that when we are calling reader.Close() the associated connection object will also be closed.

Interesting?   Share and Bookmark this


Navigate to:

 Submit Interview Questions

Can a DataAdapter.Fill method take DataTable as parameter or it works only ...

What is typed dataset ? ...

Random Interview Questions
Help: If for some reason you are getting the same question by clicking Next Question or Previous Question, Try clicking Categories link above.

Related interview questions



Advertisement

About Us | The Team | Advertise | Contact Us | Feedback | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found copied contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
All rights reserved to DotNetFunda.Com. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
(Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher)