closing the database connection