[Mono-devel-list] ByteFX DataReader problem.

Rob.Tillie at Student.tUL.EDU Rob.Tillie at Student.tUL.EDU
Sat Feb 21 02:57:59 EST 2004


Hello everyone,

 

We're creating a web application in C# using the ByteFX drivers for MySQL.

The business objects all fill themselves using DataReaders, like this:

 

IDataReader reader = AdoHelper.ExecuteReader(sql);

Using (reader)

{

            BusinessObject.Fill();

}

 

We use the AdoHelper class from the revised MDAB application block over at
gotdotnetcom, which creates a new connection for every reader when passed a
connection string, 

And the reader is set to ConnectionState.CloseConnection.

Now, to my understanding, the using statement should close the reader,
thereby closing the connection also.

 

We created unit tests for every business object (about 14 tests each with 3
methods), and using NUnit GUI I believe the unit tests are executed
simultaneously using threads. 

When run on localhost, they all succeed. When run on another development
machine (using the db on my machine) a couple fail and some tests hang,
giving some timeout exception eventually. Besides the timeouts, every failed
test has en exception of "Out of order" (something like that). However,
independently all tests work. 

Using 'netstat' we can see that there are a lot of connections open to the
database, even after terminating the tests, so obviously there's something
wrong.

 

Note: The connection string specifies a connection pool of 1 to 10.

 

Anyone have an idea what could possibly be wrong?

 

Greetz,

-- Rob.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040221/7d71011a/attachment.html 


More information about the Mono-devel-list mailing list