Ensure database filename is set to NULL when database handle is closed.