pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas <maps.on@gmx.net>
Cc: pgsql-odbc@postgresql.org
Subject: Re: ADO and sequences
Date: Wed, 23 Aug 2006 22:19:05 +0200
Message-ID: <44ECB839.3080903@gmx.net> (raw)
In-Reply-To: <44EC1689.8080907@tpf.co.jp>
References: <44EB410A.10809@gmx.net>
	<44EC1689.8080907@tpf.co.jp>



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?





view thread (10+ messages)  latest in thread

Message-ID: <44ECB839.3080903@gmx.net>
Permalink:  ../44ECB839.3080903@gmx.net/
Also on:    postgresql.org/message-id/44ECB839.3080903@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: maps.on@gmx.net
  Subject: Re: ADO and sequences
  In-Reply-To: <44ECB839.3080903@gmx.net>
  References: <44EB410A.10809@gmx.net> <44EC1689.8080907@tpf.co.jp> <44ECB839.3080903@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox