Greg,
I think the problem is because you're opening the connection and leaving it open. This is not something you want to do unless you're working with a Transaction. If you are simply filling DataSets or DataTables in a DataSet, then the DataAdapter.Fill() method automatically opens and closes the connection as needed. Can you post more of your code?
~~Bonnie
>Hi All,
>
>Recently, I am getting the following error when selecting rows for a single table.
>
>
>Timeout expired. The timeout period 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.
>>
>Here is the code.
>
>
>
>SqlConnection Connection = null;
>Connection = new SqlConnection( myConnectionString );
>Connection.Open();
>
>SqlCommand myCommand;
>myCommand = new SqlCommand( "SELECT * FROM Node " );
>
>
>The error occurs on the last line in the code above. The interesting thing is it did work before I added a new table to the database. I have not even added the code to access the new table yet. And it performs other SQL Select statement (2 actually) before attempting this one.
>
>Can anyone help me understand why I would be getting this error?
>
>Thanks