commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William R. Speirs (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (DBUTILS-101) QueryRunner fails to detect broken pmd
Date Mon, 01 Oct 2012 18:05:08 GMT

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

William R. Speirs closed DBUTILS-101.
-------------------------------------

    Resolution: Not A Problem
    
> QueryRunner fails to detect broken pmd
> --------------------------------------
>
>                 Key: DBUTILS-101
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-101
>             Project: Commons DbUtils
>          Issue Type: Improvement
>    Affects Versions: 1.5
>            Reporter: S├ębastien Le Ray
>            Priority: Minor
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> I recently fall across a strange issue with SQLServer JDBC driver and DBUtils. PreparedStatement#getParameterMetadata
sometimes throw an SQLException which is not caught in fillParameter.
> The issue arises with pagination queries like
> SELECT * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY field1 ASC) AS RowNum,  field1 as
id, field2 as reference FROM MY_TABLE WHERE 1 = 1  AND field1 LIKE ?) as toPaginate WHERE
RowNum >= 1 AND RowNum <= 50
> the query is fine but getParameterMetaData throw an exception complaining about a syntax
error near WHERE. Passing pmdKnownBroken to true solves this but stmt.getParameterMetaData();
should be wrapped to catch the exception to adjust pmdKnownBroken.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message