You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tomasz Pik <to...@gmail.com> on 2004/11/10 13:23:05 UTC

Re: Classcastexception from Statement to ifmxSatetement

On Wed, 10 Nov 2004 12:57:49 +0100, Akacem Mohammed
<mo...@arbeitsagentur.de> wrote:
> Hello,
> 
> I tried to use de dbcp1.2 und  I follwowed the examples in dbcp commons.

[...]

>              IfmxStatement informixStatement= (IfmxStatement)stmt; // THE CASTING FAILED HIER !!

// untested, but after looking at DBCP API
org.apache.commons.dbcp.DelegatingStatement delegating =
(org.apache.commons.dbcp.DelegatingStatement) stmt;

IfmxStatement informixStatement= (IfmxStatement) delegating.getDelegate();
> 
>              serialvalue = informixStatement.getSerial();
> 
> Althougt I earlier used the com.bimechanic.sql package for pooling and the same code above did work.

Probably this package do not wrap connections/statements/resultsets as
DPCP does.

HTH,
Tomek

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org