X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 016923A3F3C for ; Fri, 12 Nov 2004 17:38:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61922-06 for ; Fri, 12 Nov 2004 17:38:39 +0000 (GMT) Received: from smtp.enter.net (smtp.enter.net [216.193.128.24]) by svr1.postgresql.org (Postfix) with ESMTP id DF6C73A202A for ; Fri, 12 Nov 2004 17:38:39 +0000 (GMT) Received: from localhost (mail.enter.net [216.193.128.40]) by smtp.enter.net (Postfix) with ESMTP id 4BCE6CD3D9 for ; Fri, 12 Nov 2004 12:38:38 -0500 (EST) Received: from [216.193.128.221] (fahey.enter.net [216.193.128.221]) by smtp.enter.net (Postfix) with ESMTP id 2A45ECCD37 for ; Fri, 12 Nov 2004 12:38:38 -0500 (EST) Message-ID: <4194F497.9040104@enter.net> Date: Fri, 12 Nov 2004 12:36:23 -0500 From: Mike Fahey User-Agent: Mozilla Thunderbird 0.8 (X11/20041104) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Postgres list Subject: Getting the last inserted id Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checker-Version: Enter.Net Virus Scanner 1.1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/48 X-Sequence-Number: 4662 So I guess the question still remains, how do you get the last inserted id from a sequence? I'm using access 2003 & postgres odbc 8.0.02 select @@IDENTITY seems to be MS Specific and not work with postgres. calling currval has to be a pass-through query which makes it high complicated if at all possible. How does everyone else do this ? How does any database maintain referential integrity if this doesn't work?