How can we force the connection object to close after my data reader is closed?

 Posted by ArticlesMaint on 9/17/2009 | Category: ADO.NET Interview questions | Views: 7398

Answer: -
Command method Execute reader takes a parameter called as Command Behavior where in we can specify saying close connection automatically after the Data reader is close.

PobjDataReader = pobjCommand.ExecuteReader (CommandBehavior.CloseConnection)

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response