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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
