MySql Connector/NET Pooling

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I am trying to configure my application to work with MySQL
using Connector/NET and I wish to use connection pooling. What is the
best way to do this?

This is what I have so far:

MySqlConnection myConnection;
MySqlDataAdapter myDataAdapter;
DataSet myDataSet;

String strSql;

myConnection = new MySqlConnection("server=localhost; user id =
testuser; password=abc123; database=test;pooling=false;");

strSql = "Select * From Users;";

myDataAdapter = new MySqlDataAdapter(strSql, myConnection);

myDataSet = new DataSet();

myDataAdapter.Fill(myDataSet, "mytable");

DataGrid1.DataSource = myDataSet;

Now, I was thinking about putting the connection string in the
web.config file with pooling=true, but I a not sure what that would do.
I checked the documentation for Connection/NET and it doesn't give any
information on the pooling parameter. What happens if I set it to true?
Where do I specify the size of the pool? Do I need to make any changes
on IIS or MySQL itself?



Site Timeline