Hi there, I found your code an it was pretty helpful. I extended it, so that it can now handle files with multiple queries and comments.
All the class does is to provide a method for reading an sql file and returning a list of queries which can than be executed. As result sets can not be collected in a list that easy, you should take the returned query strings and execute them where you need the result set.
ATTENTION: Since comments are filtered out, you must not use comment signs within column names etc.
To execute the queries, you have to do the setup for the JDBC Connection etc. After that do for example: