Fix missing setString for getStatistic, refactor JDBC provider to pass SQL script name in error message.