closing db
Whats the difference between
System.Data.CommandBehavior.CloseConnection
and
.Close()
[112 byte] By [
syedwna] at [2007-11-11 10:28:16]

# 1 Re: closing db
System.Data.CommandBehavior.CloseConnection is an enumeration (http://aspnet.4guysfromrolla.com/articles/042804-1.aspx), .Close is a method. You pass System.Data.CommandBehavior.CloseConnection as a parameter to the ExecuteReader method of a Command object to instruct it to automatically close the connection after it has retrieved all the data. You call the .Close method on an object to explicitly close it.