Re: ADO and sequences

Поиск
Список
Период
Сортировка
От Andreas
Тема Re: ADO and sequences
Дата
Msg-id 44ECB839.3080903@gmx.net
обсуждение исходный текст
Ответ на Re: ADO and sequences  (Hiroshi Inoue <inoue@tpf.co.jp>)
Ответы Re: ADO and sequences
Список pgsql-odbc

Hiroshi Inoue schrieb:
> Andreas wrote:
>> rs.AddNew
>>     lngID = rs!id
> Try to get rs!id here is meaningless but
>>     rs!field1 = value1
>>     rs!field2 = value2
>> ....
>> rs.update
> you can get rs!id here maybe.
> Am I misunderstanding your point ?
>> rs.close

I tried this before my initial mail.
Even though in the table definition is
id   serial not null,
primary key (id)
I still get  rs!id = NULL after rs.addnew as well as after rs.update

Maybe your driver behaves differently to the still official 08.01.0200?

The problem affects not only the serial column but also a timestamp(0)
that defaults to NOW() and another timestamp(0) that gets set by a
trigger after every update.
All 3 debug.print as NULL in the recordset after the UPDATE.
Obviously those dynamically created values get into the table since I
see them with pgAdmin  but the newly created record isn't automatically
read back into Access's adodb.recordset object.

BTW   there is a difference between   adUseClient and adUseServer.
With adUseServer   isEmpty(r!id)   shows TRUE and the automatic columns
show nothing with debug.print.
Whereas with adUseClient   isEmpty(r!id) is FALSE   and the 3 columns
print as NULL.

Do you have further advise?



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

Предыдущее
От: Blake McBride
Дата:
Сообщение: SQLStatistics problem
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: ADO and sequences