updatable views and MS-Access 2K

Поиск
Список
Период
Сортировка
От lutz.willerding@gmail.com (Lutz Willerding)
Тема updatable views and MS-Access 2K
Дата
Msg-id eb4b01ed.0411051544.3b33158c@posting.google.com
обсуждение исходный текст
Список pgsql-odbc
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 <YourPrimaryKeySpecHere>'
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)

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Vassilev, Lubomir G."
Дата:
Сообщение: OpenLink ODBC driver problem
Следующее
От: Rodrigo Carvalhaes
Дата:
Сообщение: Re: Snapshots