Re: Error when changing views

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Balt van Rees <vanrees-postgres(at)vvtp(dot)tudelft(dot)nl>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Error when changing views
Date: 2002-06-07 02:51:52
Message-ID: 3D001FC8.A171FFFA@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Balt van Rees wrote:

> Hi,
>
> I have a problem with changing views in Access. Of course
> I designed the proper rules (CREATE RULE upd_viewfoo AS ON
> UPDATE TO viewfoo DO INSTEAD UPDATE tablebar SET ..... )
> and it all works when I update the view manually (i.e. in
> a terminal).

> However, when I try to update the view via ODBC (in Access
> 97) something goes wrong. Access gives me a basic error
> ("This record has been changed by another user, blablabla")
> that doesn't make sense in my opinion. What does make sense,
> however, is the my.log: among all the lines of code, I found
> the following:

[snip]

> IMHO, it seems the "UPDATE 0" returned by postgresql (as it also
> does on a manual update, since this is default when updating a
> view) makes the ODBC driver think 0 rows are updated, the query
> would be unsuccesfull and triggers the ROLLBACK and gives me the
> error in Access.

Yes. It's a known bug in 7.2. Please look at the thread
in pgsql-general [Using views and MS access via odbc]
e.g. http://archives.postgresql.org/pgsql-general/2002-05/msg00170.php.

regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2002-06-07 05:32:53 Re: Double error messages
Previous Message Hiroshi Inoue 2002-06-07 02:40:58 Re: int8 becames string in BDE :-(