DAAB is using "The using statement" which automatically calls Dispose on the
object being "used" when leaving the scope of the using statement.
For example:
//C#
string connString = "Data Source=localhost;Integrated
Security=SSPI;Initial Catalog=Northwind;";
using (SqlConnection conn = new SqlConnection(connString))
{
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT CustomerId, CompanyName FROM Customers";
conn.Open();
using (SqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
Console.WriteLine("{0}\t{1}", dr.GetString(0),
dr.GetString(1));
}
}
"Edward W." wrote:
I was looking at the data access application block version 2 and considering
what I had read about connection pooling in that to use connection pooling
successfully, you should close your sqlconnections as quickly as possible.
The DAAB doesn't seem to close or dispose of connections. Are people using
the DAAB on web applications or maybe have people added to the DAAB to
close/dispose connections?