Update-able View linked to Access - Mailing list pgsql-odbc

From Richard Broersma Jr
Subject Update-able View linked to Access
Date
Msg-id 947953.40775.qm@web31804.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Update-able View linked to Access
List pgsql-odbc
I created an updateable view using a two part rule and linked it as a table to MS Access.  I am
getting the error below when ever I try to update the name field.  I tried manually updating the
view from an access update query using only "ID" and it worked perfectly.  When I linked the view
as a table I defined id as the primary key, so why is the query sent by the ODBC driver using the
other fields as well when "ID" should be all that it needs?.

I could add these additional fields to the rules update where conditions, but if it works should
it even be necessary?

ERROR Message:

BEGIN;UPDATE "public"."vhusband" SET "name"=E'hell2'  WHERE "id" = 14 AND "name" = E'hello3' AND
"tiesize" = 12
ROLLBACK

It seems my rules are working outside the odbc transaction.

Update portion of Rule Definition:

CREATE OR REPLACE RULE
            vhusband_update_person
AS ON UPDATE TO
            public.vhusband
DO INSTEAD
(
    UPDATE
        public.person
    SET
        name = NEW.name
    WHERE
        id = OLD.id;
    UPDATE
        public.husband
    SET
        tiesize = NEW.tiesize
    WHERE
        id = OLD.id
)
;

Thanks for any help.

Regards,

Richard Broersma Jr.

pgsql-odbc by date:

Previous
From: "K. Kelly Close"
Date:
Subject: Re: BEST odbc driver for windows MS Access
Next
From: Hiroshi Inoue
Date:
Subject: Re: SQLSetPos problem ?