Thread: FW: Postgres 8.1 sequences and 'CALL'-syntax

FW: Postgres 8.1 sequences and 'CALL'-syntax

From
"Schnabl, Sebastian"
Date:
> Connection conn = ...
> CallableStatement cs = conn.prepareCall("{? = call
> nextval('seq_nm')}"); cs.registerOutParameter(1, Types.BIGINT);
> cs.execute(); long nextval = cs.getLong(1); cs.close();

Yeah, it seems to work, if i change the definition for calling the sequence in conjunction with sequoia trough jboss
changeinto: "{call nextvalue('seq_name')}"  [the "{}" pair is important !] and use the
"org.postgresql.jdbc3.Jdbc3PooledDataSource"driver class. 

Many Thx !