I am writing a Windows Form application in which it would select or modify data from the database using a single connection. I enabled the pooling option and and set the max pool size to 10.
In order to avoid orphaned connections and overflows, I would like to write code to monitor the number of connections in pool of a specificed user. However, I have no idea what to do 'coz the .NET CLR Data (Performance Monitor) doesn't work for MySQL.
Any help is appreciated.
Best Rgds,
Joanne
Monitor of Connection Pool
What I mean "single connection" is a static connection used by the whole application. I tried to to use the said connection while it is executing a query, but the application freezes until the first query is being finished. I am confused with how the connection pool works. How can the pool improve the performance of application in dealing with differnt queries simultaneously?
Best Rgds,
Joanne
Best Rgds,
Joanne
Under your situation (static connection used by the whole application) connection pooling works only if you often close and open the connection.
You can find additional information about connection pooling here (note that MySQLDirect .NET uses the same connection poooling concept as the .NET Framework Data Provider for Oracle).
You can find additional information about connection pooling here (note that MySQLDirect .NET uses the same connection poooling concept as the .NET Framework Data Provider for Oracle).