Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B67E69F9F47 for ; Fri, 17 Nov 2006 04:51:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 41943-04 for ; Fri, 17 Nov 2006 08:51:26 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 0288F9F9EF5 for ; Fri, 17 Nov 2006 04:51:26 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id kAH8pLHF083114 for ; Fri, 17 Nov 2006 04:51:21 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id kAH8Mk4h077427 for pgsql-odbc@postgresql.org; Fri, 17 Nov 2006 04:22:46 -0400 (AST) (envelope-from news) From: "Dmitry Samokhin" X-Newsgroups: pgsql.interfaces.odbc Subject: Re: Serial columns and ADO Date: Fri, 17 Nov 2006 11:22:56 +0300 Organization: MNPP Saturn Lines: 34 Message-ID: References: <4553CAC6.5020001@tpf.co.jp> <4554463D.6000301@tpf.co.jp> <45549258.9010802@tpf.co.jp> <4557B1C5.1030200@tpf.co.jp> <455C6F5F.7000203@tpf.co.jp> Reply-To: "Dmitry Samokhin" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 To: pgsql-odbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/53 X-Sequence-Number: 8435 > 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.