Brian
Are you using connection pooling?
-reggie
> -----Original Message-----
> From: Bryan Luisana [mailto:bluisana@stripped]
> Sent: Wednesday, February 02, 2005 12:47 PM
> To: dotnet@stripped
> Subject: Dataadapter doesn't disconnect?
>
> Hello,
>
> Is anyone else having an issue when using the a mysqldatadapter.
>
> Even doing something as simple as the code below creates a conneciton that
> sleeps after I
> am done with it. This means that everytime a new user connects to my
> webpage a new
> conneciton is made untill the mysql max connections is reached.
>
> MySqlConnection connection = new MySqlConnection(constr);
>
> MySqlCommand myCommand = new MySqlCommand(sqlCommand);
> myCommand.CommandType = CommandType.Text;
>
> myCommand.Connection=connection;
> MySqlDataAdapter dataAdapter = new MySqlDataAdapter(myCommand);
> DataTable myDataTable = new DataTable();
>
> try
> {
> connection.Open();
> dataAdapter.Fill(myDataTable);
> connection.Close();
> connection.Dispose();
> dataAdapter.Dispose();
> }
>
> Neither the close nor the dispose method makes the connection to the
> database close?
>
> HELP!!
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe: http://lists.mysql.com/dotnet?unsub=1