Update-able View linked to Access

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Update-able View linked to Access
Date: 2006-12-11 23:55:35
Message-ID: 947953.40775.qm@web31804.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2006-12-12 00:03:37 Re: SQLSetPos problem ?
Previous Message K. Kelly Close 2006-12-11 20:22:16 Re: BEST odbc driver for windows MS Access