Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 393429FB39A for ; Wed, 11 Oct 2006 03:14:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 83822-05 for ; Wed, 11 Oct 2006 06:14:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (smtp.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id E83889FB395 for ; Wed, 11 Oct 2006 03:14:22 -0300 (ADT) Received: (qmail 27529 invoked from network); 11 Oct 2006 15:14:21 +0900 Received: from unknown (HELO ?100.0.32.170?) (100.0.32.170) by sd2.tpf-fw-c.co.jp with SMTP; 11 Oct 2006 15:14:21 +0900 Message-ID: <452C8BBB.9060409@tpf.co.jp> Date: Wed, 11 Oct 2006 15:14:19 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Garner Chung CC: pgsql-odbc@postgresql.org Subject: Re: Extra Opts = Ox2 (Fake MS SQL Server so that MS Access References: <6FB011BE26AACD4CB5F2B505AE0BEB2E0204C07D@MI8NYCMAIL05.Mi8.com> In-Reply-To: <6FB011BE26AACD4CB5F2B505AE0BEB2E0204C07D@MI8NYCMAIL05.Mi8.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.43 tagged_above=0 required=5 tests=RCVD_IN_WHOIS_BOGONS X-Spam-Level: ** X-Archive-Number: 200610/17 X-Sequence-Number: 8280 Garner Chung wrote: > Hey Gang, > > We've been working hard here trying to get our rather large MS Access > application to work with PG as its backend. At a gross level, that means > keeping our existing forms and reports while instead pointing them to > our new PG backend using the psqlODBC driver. We have learned a > tremendous amount in the process -- gaining a better understanding of > architecture and idiosyncracy alike. > > Right now, we're snagged on what seems to be a bug lying somewhere in > the ether where DAO, ODBC and psqlODBC meet. It centers around the > ability to insert into a table with a numeric ID field of type serial. > There is an Extra Opts parameter, 0x2, that one can set in the DSN to > get Access to map fields of type serial to its own native type of > "Autonumber". With this in place, one is able to append a new row to an > open record set that is bound to that table. This can be done in Access > with either the DAO Recordset AddNew method or by appending the record > in the Datasheet view of the linked table in Access. The main trick here > is ODBC's ability to ascertain the last sequence value generated by the > insert. However, we're finding this functionality is failing when the > table contains a field of PG type text(mapped to Access type memo). Please try the snapshot dll at http://www.geocities.jp/inocchichichi/psqlodbc/index.html . regards, Hiroshi Inoue