FW: Postgres 8.1 sequences and 'CALL'-syntax

Поиск
Список
Период
Сортировка
От Schnabl, Sebastian
Тема FW: Postgres 8.1 sequences and 'CALL'-syntax
Дата
Msg-id CE99C61B73E843438E690CBE9C63A5AF7323AC@srv02.dresden.local
обсуждение исходный текст
Список pgsql-general
> 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 !



В списке pgsql-general по дате отправления:

Предыдущее
От: Kenneth Downs
Дата:
Сообщение: Re: SQL Rule
Следующее
От: Geoffrey
Дата:
Сообщение: Re: Mailing list setup issue