How data reader is closed in ado .net

It is containing all topics related to Visual Basic, .NET Framework, Web Resource, GDI etc.
Ladva Nidhi
Posts: 295
Joined: Sat Sep 20, 2014 5:26 pm
Contact:

How data reader is closed in ado .net

Postby Ladva Nidhi » Sun Oct 26, 2014 10:23 am

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


Guest

Re: How data reader is closed in ado .net

Postby Guest » Wed Jul 15, 2015 11:24 am

Command method Executereader takes a parameter called as CommandBehavior wherein we can specify saying close connection automatically after the Datareader is close.
pobjDataReader = pobjCommand.ExecuteReader(CommandBehavior.CloseConnection)


Return to “Visual Basic .NET and ASP.NET”

Who is online

Users browsing this forum: No registered users and 1 guest