FW: Postgres 8.1 sequences and 'CALL'-syntax

Поиск
Список
Период
Сортировка
Искать

FW: Postgres 8.1 sequences and 'CALL'-syntax

От:
"Schnabl, Sebastian" <s.schnabl@qualitype.de>
Дата:
> 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 change into: "{call nextvalue('seq_name')}"  [the "{}" pair is important !] and use the "org.postgresql.jdbc3.Jdbc3PooledDataSource" driver class.

Many Thx !
 

FAQ