Pull this prepareStatement outside of the for loop, as we can reuse it again and again, and move the finally block too.