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 4E20D3A3EE4 for ; Fri, 5 Nov 2004 23:54:14 +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 02781-06 for ; Fri, 5 Nov 2004 23:54:02 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 6CA8C3A3EDC for ; Fri, 5 Nov 2004 23:54:04 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id iA5Ns1J7004892 for ; Fri, 5 Nov 2004 23:54:01 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id iA5Niog9002821 for pgsql-odbc@postgresql.org; Fri, 5 Nov 2004 23:44:50 GMT From: lutz.willerding@gmail.com (Lutz Willerding) X-Newsgroups: comp.databases.postgresql.interfaces.odbc Subject: updatable views and MS-Access 2K Date: 5 Nov 2004 15:44:51 -0800 Organization: http://groups.google.com Lines: 30 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-odbc@postgresql.org 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/11 X-Sequence-Number: 4625 how do you do it? looking for a solution, I found this thread just some lines below: update rules + views + .... which suggests using ctid, causing problems with views using more than 1 table. for views using 2 tables, I found the following partial solution: 1: updatable views need a 'catch all rule'; docs indicate to do something like: 'create or replace rule UpdRuleCatchAll as on update myview do instead nothing;' It looks like, this 'nothing' makes access moan about 'no record'. 'do nothing' replaced by: 'do select * from myview where ' returns 1(!) record. -> no 'record missing' any more. 2: do specific update rules with '...where OLD.YourKey is NULL or OLD.yourkey <> NEW.yourkey (update or insert the table involved) where (use exactly the same keys as you will give access as the primary key(s) when importing the view as a linked table) didn't try to do insert or delete rules yet; using a form, I just call a stored procedure on a 'OnClick'-Event that is designed to do what is needed, and the .Requery of the matching MS-Access-Object. This works _without_ including ctid in the views definition _and_ it works with 2 tables involved. (just trying to get the third)