Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 7005 invoked from network); 21 Aug 2009 11:25:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Aug 2009 11:25:15 -0000 Received: (qmail 40515 invoked by uid 500); 21 Aug 2009 11:25:36 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 40412 invoked by uid 500); 21 Aug 2009 11:25:36 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 40402 invoked by uid 99); 21 Aug 2009 11:25:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2009 11:25:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2009 11:25:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D31FF234C004 for ; Fri, 21 Aug 2009 04:25:14 -0700 (PDT) Message-ID: <1402740232.1250853914850.JavaMail.jira@brutus> Date: Fri, 21 Aug 2009 04:25:14 -0700 (PDT) From: =?utf-8?Q?Julien_Aym=C3=A9_=28JIRA=29?= To: issues@commons.apache.org Subject: [jira] Commented: (DBUTILS-58) QueryRunner: Allow to completly disable use of PreparedStatement#getParameterMetaData In-Reply-To: <1665800573.1250851634795.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DBUTILS-58?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1274= 5906#action_12745906 ]=20 Julien Aym=C3=A9 commented on DBUTILS-58: ------------------------------------ The exception was thrown using msbase.jar, unknown version. I was able to retrieve these information from com.microsoft.jdbc.base.BaseD= river.class using jad: {code} public final int getMajorVersion() { return 2; } public final int getMinorVersion() { return 2; } {code} > QueryRunner: Allow to completly disable use of PreparedStatement#getParam= eterMetaData > -------------------------------------------------------------------------= ------------ > > 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=C3=A9 > Attachments: QueryRunner.diff, stacktrace.txt > > Original Estimate: 2h > Remaining Estimate: 2h > > Some legacy JDBC driver does not support the PreparedStatement#getPrepare= dStatementMetaData() method (see stacktrace in joined file). > I would like to add an new boolean field (named disablePmd, set via const= ructors) to QueryRunner, which would completly remove the use of this metho= d in QueryRunner#fillStatement. > {code} > ParameterMetaData pmd =3D null; > if (!disablePmd) { > pmd =3D stmt.getParameterMetaData(); > if (pmd.getParameterCount() < params.length) { > throw new SQLException("Too many parameters: expected " > + pmd.getParameterCount() + ", was given " + para= ms.length); > } > } > {code} --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.