Wrong assumption, set breakpoints and debug. Btw, on exception you don't close connection. Perhaps using
finally
block is a good idea?