commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Fabulich (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DBUTILS-58) QueryRunner: Allow to completly disable use of PreparedStatement#getParameterMetaData
Date Tue, 03 Nov 2009 01:47:59 GMT

     [ https://issues.apache.org/jira/browse/DBUTILS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dan Fabulich closed DBUTILS-58.
-------------------------------

    Resolution: Fixed

Fixed in revision 832257.  I didn't use Julien's patch, but just opted to reuse pmdKnownBroken.
 If PMD is known to be broken, then we don't use it for parameter counting either.

> 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é
>             Fix For: 1.3
>
>         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.


Mime
View raw message