Probably. If you want to use transactional stuff you need to make sure you are using a database which supports them.
How can you remove the trailing " and "? Actually I want to remove a trailing comma from a StringBuffer, but I am sure the principle is the same.
and I'm assuming there is no stack trace?
Is result.next() returning false?