Hi,
Maybe I'm missing something here but, I think you have a fundamental problem here...
you do this
At no point do you assign anything to the result set - looking at your code you don't use anything from the select statements/resultset - so I would strip all of that out, which will leave you just with your insert statement.
Also, since you are using a preparedstatement it would be better to do your sql call like this :
This way you don't need to worry about wrapping strings in quotes and so on?
I