Search Postgresql Archives

FW: Postgres 8.1 sequences and 'CALL'-syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 !
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux