From: Dmitry Samokhin <sdld@mail.ru>
To: pgsql-odbc@postgresql.org
Subject: Re: Serial columns and ADO
Date: Fri, 17 Nov 2006 11:22:56 +0300
Message-ID: <ejjrgl$2bjg$1@news.hub.org> (raw)
References: <E1Gi7Ct-0004cO-00.sdld-mail-ru@f76.mail.ru>
<4553CAC6.5020001@tpf.co.jp>
<ej1ghi$1sa8$1@news.hub.org>
<4554463D.6000301@tpf.co.jp>
<ej1tlg$6km$1@news.hub.org>
<45549258.9010802@tpf.co.jp>
<4557B1C5.1030200@tpf.co.jp>
<ej9djc$1imc$1@news.hub.org>
<455C6F5F.7000203@tpf.co.jp>
> OK try the snapshot dll.
> 0x2 Extra Opts option is no longer needed for the case.
>
> regards,
> Hiroshi Inoue
OK, 'SELECT 0' has been swept out.
> Also changed to SELECT NULL in case of failure.
What failure do you mean?
But there's still another problem. Let our table 't1' be initially empty and
the sequence reset to 1. Consider the following ADO operations:
rs.AddNew
rs("col2") = "Sample string"
rs.Update
MsgBox rs("col1")
rs.AddNew
rs("col1") = 2
rs("col2") = "Sample string"
rs.Update
MsgBox rs("col1")
Look, the second insert operation sets the identity field explicitly. But
the driver still lets 'SELECT currval...' to pass. As a result, my explicit
value '2' is replaced by the currval()=1. Such distortion should be avoided
anyway.
Dmitry.
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: sdld@mail.ru
Subject: Re: Serial columns and ADO
In-Reply-To: <ejjrgl$2bjg$1@news.hub.org>
References: <E1Gi7Ct-0004cO-00.sdld-mail-ru@f76.mail.ru> <4553CAC6.5020001@tpf.co.jp> <ej1ghi$1sa8$1@news.hub.org> <4554463D.6000301@tpf.co.jp> <ej1tlg$6km$1@news.hub.org> <45549258.9010802@tpf.co.jp> <4557B1C5.1030200@tpf.co.jp> <ej9djc$1imc$1@news.hub.org> <455C6F5F.7000203@tpf.co.jp> <ejjrgl$2bjg$1@news.hub.org>
* 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