From: Richard Broersma Jr <rabroersma@yahoo.com>
To: pgsql-odbc@postgresql.org
Subject: Update-able View linked to Access
Date: Mon, 11 Dec 2006 15:55:35 -0800 (PST)
Message-ID: <947953.40775.qm@web31804.mail.mud.yahoo.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: rabroersma@yahoo.com
Subject: Re: Update-able View linked to Access
In-Reply-To: <947953.40775.qm@web31804.mail.mud.yahoo.com>
References: <947953.40775.qm@web31804.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox