Hey all,

Using C# 2008, an Access 2003 *.mdb database, and a Microsoft.Jet.OLEDB.4.0 connection.

I am building a program that monitors and queues tasks ultimately for around 40 users on the same Office LAN (at the moment I only have 7 users on it). The program adds these tasks to the Queue table of my database (hosted on the network), then creates a temporary file (also on the network). All the client programs periodically check for the existence of this file, and if they find it, run a few TableAdapter.Fill() commands to retrieve the data that was placed in the database.

I am finding that, quite often but not so regularly that I can replicate it under controlled conditions, the program will either hang on the .Fill() command for a period of 10-20 seconds (confirmed to be hanging on that command specifically by pausing the debugger while it was happening), or it will throw the following exception:

System.Data.OleDb.OleDbException: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
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 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at ModelManager.Model_ManagerDataSetTableAdapters.GeneralTableAdapter.Fill(GeneralDataTable dataTable)
at ModelManager.Form1.Form1_Load(Object sender, EventArgs e)
Would changing to a Microsoft.ACE.OLEDB.12.0 connection prevent this exception or keep it from hanging? Could anyone offer any suggestions as to what is causing either of these pheneomena (I assume it relates somehow to the spike in network traffic when a user makes a modification and all the other users run a Fill() command within 3 seconds, but googling the exception and the conditions surrounding it has turned up no valuble information)?

Gratefully,
Qu