Search code examples
.netparadox

Paradox: Query without locking the database file


I'm trying to query an existing Paradox database that a third-party application populates. My application is now blocking the third-party app and I'm wondering if there are any "query hints" or connection string properties that will query/open the database without blocking.

The database is queried using ".NET Framework Data Provider for ODBC" connections.


Solution

  • Even if you follow the standard .NET 'disconnected' pattern (you should, close every connection asap) you are probably still keeping a connection open doue to the default connection pooling. To test that you should clear the ConnectionPool after you execute a query.

    As far as I can tell, for ODBC it should be:

    System.Data.Odbc.OdbcConnection.ReleaseObjectPool()