Fixed the utils to do all the jdbc stuff in a single call