Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 6228 invoked from network); 17 Mar 2005 20:59:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Mar 2005 20:59:36 -0000 Received: (qmail 75778 invoked by uid 500); 17 Mar 2005 20:59:29 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 75716 invoked by uid 500); 17 Mar 2005 20:59:29 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 75702 invoked by uid 99); 17 Mar 2005 20:59:29 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from gen0susm01.citco.com (HELO GEN0SUSM01.citco.com) (212.27.172.85) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 17 Mar 2005 12:59:28 -0800 Message-ID: <53129C5BC127054F95EFB7567190D3E0066A1C26@NYC1W2K22> From: "Bridges, Ed NYC" To: 'Jakarta Commons Users List' Subject: RE: DBCP: ClassCastException -- (OraclePreparedStatement) Date: Thu, 17 Mar 2005 15:59:22 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Received-SPF: none X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N getInnermostDelegate() -----Original Message----- From: Qin Ding [mailto:qding@csc.com] Sent: Thursday, March 17, 2005 3:55 PM To: Jakarta Commons Users List Subject: RE: DBCP: ClassCastException -- (OraclePreparedStatement) Ed: Thank you for your help. DelegatingStatement has two methods: getDelegate(); getInnermostDelegate(); Both return Statement. Which one should I use? Qin ---------------------------------------------------------------------------- ------------ This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------- ------------ "Bridges, Ed NYC" cc: 03/17/05 01:34 Subject: RE: DBCP: ClassCastException -- PM (OraclePreparedStatement) Please respond to "Jakarta Commons Users List" You need to get the underlying statement. I.e. cast it to org.apache.commons.dbcp.DelegatingStatement And then call the "getUnderlyingStatement()" method (it may be named something similar/different). HTH --e-- -----Original Message----- From: Qin Ding [mailto:qding@csc.com] Sent: Thursday, March 17, 2005 2:09 PM To: Jakarta Commons Users List Subject: Re: DBCP: ClassCastException -- (OraclePreparedStatement) I am using common-dbcp-1.2.1; classes12.jar from Oracle download two day ago. The database is Oracle 9.2. One column in a table is defined as the type of NVARCHAR2(300). The following first line raised ClassCastException: OraclePreparedStatement pstmt = (OraclePreparedStatement) con.prepareStatement(query); pstmt.setFormOfUse(2, Const.NCHAR); Can someone help me with this problem? Thank you. Qin ---------------------------------------------------------------------------- ------------ This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------- ------------ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org