[ https://issues.apache.org/jira/browse/DBUTILS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julien Aymé updated DBUTILS-58:
-------------------------------
Attachment: QueryRunner.diff
stacktrace.txt
The stacktrace, and the proposed patch
> QueryRunner: Allow to completly disable use of PreparedStatement#getParameterMetaData
> -------------------------------------------------------------------------------------
>
> Key: DBUTILS-58
> URL: https://issues.apache.org/jira/browse/DBUTILS-58
> Project: Commons DbUtils
> Issue Type: Improvement
> Affects Versions: 1.2
> Environment: MSSQL Server legacy jdbc driver
> Reporter: Julien Aymé
> Attachments: QueryRunner.diff, stacktrace.txt
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Some legacy JDBC driver does not support the PreparedStatement#getPreparedStatementMetaData()
method (see stacktrace in joined file).
> I would like to add an new boolean field (named disablePmd, set via constructors) to
QueryRunner, which would completly remove the use of this method in QueryRunner#fillStatement.
> {code}
> ParameterMetaData pmd = null;
> if (!disablePmd) {
> pmd = stmt.getParameterMetaData();
> if (pmd.getParameterCount() < params.length) {
> throw new SQLException("Too many parameters: expected "
> + pmd.getParameterCount() + ", was given " + params.length);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|