Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: ocean10000
After a number of calls in getting a data adapter filled I now get "Timeout expired. The timeout period has elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached"
This is unusual since the project worked in 2002.
I have spent ages debugging the code to find any possible loose connections. I have tried adding connection.close statements, execute dispose methods for data adapter, increase the timeout period.
Although I can increase the pool size it does not permanently solve the problem.
I believe Vladi posted a similar problem but the posting had expired so I don't know if he found a solution
You can also run into problems when you use the DataAdapter object. The DataAdapter Fill and Update methods automatically open the DataAdapter object's connection and close it after the data I/O operation is complete. However, if the connection is already open when the Fill or Update method is executed, ADO.NET doesn't close the SqlConnection after the method completes. This is another opportunity to leak a connection.
I know cleaning up after yourself is a foreign concept to VB programmers, but it seems to be necessary in .NET regardless of what the docs say... ;-) (Plus, it's a good idea no matter what language you're using.)