Update-able View linked to Access

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Update-able View linked to Access
Дата
Msg-id 947953.40775.qm@web31804.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: Update-able View linked to Access
Список 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 по дате отправления:

Предыдущее
От: "K. Kelly Close"
Дата:
Сообщение: Re: BEST odbc driver for windows MS Access
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: SQLSetPos problem ?