Put a
using
block around the construction of the Connection, Command and Adapter objects:
using (con = new OleDbConnection(ConStr))
{
using (OleDbCommand cmd = new OleDbCommand(query, con))
{
...
And only try to delete the file outside the outer
using
block - that way, all open activities are Disposed before you try, and it should work.