Java: Prepare a statement without a connection

java, sql

Solution

Take a look at this Java library: http://openhms.sourceforge.net/sqlbuilder/

Problem

I'm trying to generate some sql files in my java application. The application will not execute any sql statements, just generate a file with sql statements and save it. I'd like to use the `java.sql.PreparedStatement` to create my statements so that i don't have to validate every string etc. with my own methods. Is there a way to use the `PreparedStatement` without the calling `java.sql.Connection.prepareStatement(String)` function, because I don't have a `java.sql.Connection`?

Original source