G
Guest
I have found a resource leak in v1.1 of the framework
With sql debugging on the following code does not return the closed connections to the connection pool as it should
This might happen at other times also, but on my development machine is always happens
Operating System XP Professiona
FrameWork 1.
Visual Studio 200
SQL Debugging = Enable
Witn Debugging Disabled, or on the 1.0 framework this code runs sucessfully
Anyone know of any documentation from Microsoft on this issue
using System
using System.Data.SqlClient
namespace ConsoleApplication
/// <summary
/// Summary description for Class1
/// </summary
class GetDat
/// <summary
/// The main entry point for the application
/// </summary
[STAThread
static void Main(string[] args
Test t = new Test()
t.GetDataResults()
class Tes
public void GetDataResults(
SqlConnection mConn
mConn = new SqlConnection("Persist Security Info=False;User ID=sa;Password=password;Initial Catalog=NamedDatbase;Data Source=ServerName;Packet Size=4096;Workstation ID=" + System.Environment.MachineName)
SqlCommand comm = new SqlCommand("SELECT * FROM Client WHERE CustID=2",mConn)
SqlDataReader reader
for(int count = 0; count < 5000; count++
mConn.Open()
reader = comm.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
reader.Read()
reader.Close()
With sql debugging on the following code does not return the closed connections to the connection pool as it should
This might happen at other times also, but on my development machine is always happens
Operating System XP Professiona
FrameWork 1.
Visual Studio 200
SQL Debugging = Enable
Witn Debugging Disabled, or on the 1.0 framework this code runs sucessfully
Anyone know of any documentation from Microsoft on this issue
using System
using System.Data.SqlClient
namespace ConsoleApplication
/// <summary
/// Summary description for Class1
/// </summary
class GetDat
/// <summary
/// The main entry point for the application
/// </summary
[STAThread
static void Main(string[] args
Test t = new Test()
t.GetDataResults()
class Tes
public void GetDataResults(
SqlConnection mConn
mConn = new SqlConnection("Persist Security Info=False;User ID=sa;Password=password;Initial Catalog=NamedDatbase;Data Source=ServerName;Packet Size=4096;Workstation ID=" + System.Environment.MachineName)
SqlCommand comm = new SqlCommand("SELECT * FROM Client WHERE CustID=2",mConn)
SqlDataReader reader
for(int count = 0; count < 5000; count++
mConn.Open()
reader = comm.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
reader.Read()
reader.Close()