Today I have implemented an awful hack during my code where every request towards the database opens it's own connection because of the truth that I could not find in whatever way make it possible for MARS (multiple active record sets) when interacting having a MySQL database.

During my C# program I perform a large amount of parallel work, which is not an issue regarding databases for example MSSQL 2005 and 2008 (append MultipleActiveResultSets=in keeping with your connection string) and SQLite (supports it "as they areInch) and you'll be able to retrieve two datasets in the database simultaneously.

Stuff that I know: it's costly to spread out an association towards the database as well as their for I must keep these low.

Any suggestions?

Consider the MySQL documentation for connection string parameters (no MARs) -

http://dev.mysql.com/doc/refman/5.5/en/connector-net-programming-connection-options.html

Stuff that I know: it's costly to spread out an association towards the database as well as their for I must keep these low.

Utilize connection pooling completely! (just make certain you apply the identical connection string every time).

Perhaps a the easy way handle this type would be to implement that parallel information systems to your database, using a store procedure or perhaps a cursor, so you don't have to cope with a really specific database feature.

Any suggestions?

I'm not sure if there actually is no method to enable MARS with MySQL, but when that's correct, then my best suggestion would be to implement connection-pool.