This question is locked. New answers and comments are not allowed.
Hi,
I'm trying to use SQL Server CE for unit testing, but ran into an issue when trying to reset the database. I (re)create the database in the setup before each test. To recreate the database I delete the DB file if it exists. That delete fails because the file is locked when two consecutive tests are being run, presumably because there is still an open connection to the database. I think I need to fully 'shut down' OpenAccess so it will release it's open database connections. Is there a proper way to make OpenAccess close it's database connections?
Aong the same lines, is there a way to make OpenAccess flush it's caches so we can ensure the data we fetched is actually retrieved from the database?