When writing a script utility to insert images into a database, I wondered if there was a way to do this. In the end, decided something like this:
def sql = Sql.newInstance(...) // ... Connection conn = sql.getConnection() PreparedStatement stmt.prepareStatment(...) stmt.setBinary(...) stmt.executeUpate()
There must be a more attractive way, can someone enlighten me?
Jonathan
source share