views:

25

answers:

1

After several hours (~6 hours Win7 64bit, ~24hours WinXP) of running multi-threaded (.NET Framework 3.5 SP1 WinForms) desktop application using .mdb files as backend I'm getting the following runtime error:

Exception -> Unspecified error

StackTrace ->

at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.OleDb.OleDbConnection.Open()

at NetworkManager.SearchInputFileHandler.GetInputRows(SearchProgramTypeEnumeration programType, Int32 startRowNum, Int32 rowsQty, Boolean setupInProgress, Boolean filterOutUninitializedRows)

It looks like this is an OleDbProvider bug.

Have you seen/experienced something like that?

Context:

(1) I do exclusively use

using (OleDbConnection cnn = new OleDbConnection("{{mymdbConnectionStringHere}}")) {

cnn.Open();

...

}

(2) I do use IN clause in some select SQL expressions to point to external MDB tables.

I guess the issues is caused by case (2). Although that's still a hypothesis here to check (some code fixes are needed in the core code of my application, and I'm considring now will that be worth fixing, or I should better switch to MS SQL backend.)

Thank you.

A: 

I have written sample test application - the issue is caused by a bug somewhere in the internals of .NET System.Data.OleDb.

Test VS2008 SP1 solution is published here: System.Data.OleDb bug demonstration sample.

ShamilS
Even if there is no any IN clause used (or linked tables) then OleDb sample application I have written here fails after about 70,000 connections creations/destructions - TestConnection.ERROR:Unspecified error - 29/10/2010 22:42:25: 7737. StartTime = 29/10/2010 21:59:33, EndTime = 29/10/2010 22:42:25, TotalCount = 69633, ElapsedTime = 0.7142 hours...
ShamilS