An error occurred: Prepare requires an open and available Connection. The connection's current state is closed. - line 42