This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have added code tags, and broken some of the long lines; you can see how much better your code looks Beware on this forum: tick the disable smilies box otherwise :odbc turns into dbc.
But you haven’t told us what goes wrong; we can’t help if we don’t know. Do you suffer an Exception? If so, please show us the stack trace. Do you need a password?