--- Dirk Cleenwerck <dirk.cleenwerck@useitgroup.com>
escribió:
> Hi there,
>
> strSql = "CREATE VIEW bondetailtmp AS SELECT * FROM
> bondetail WHERE
> subbonnr=" & Forms!bonnentest!bonnr & ";"
> cn.Execute strSql
> strSql = "CREATE RULE bondetailtmpupd AS ON UPDATE
> TO bondetailtmp " & _
> "DO INSTEAD NOTHING;"
> cn.Execute strSql
> strSql = "CREATE RULE bondetailtmpupd2 AS ON UPDATE
> TO bondetailtmp " & _
> "WHERE OLD.subbonbeschrijving <>
> NEW.subbonbeschrijving " & _
> "DO (UPDATE bondetail " & _
> "SET
> subbonbeschrijving=NEW.subbonbeschrijving);"
> cn.Execute strSql
> Forms!bonnentest.bondetailtmp.Form.RecordSource =
> "bondetailtmp"
>
> 476 2005-01-06 18:46:34ERROR: cannot update a view
>
> 476 2005-01-06 18:46:34HINT: You need an
> unconditional ON UPDATE DO
> INSTEAD rule.
>
Just like the message says to you: yo have to use
CREATE RULE ... DO INSTEAD not just DO.
If you just does CREAT RULE ... DO it will defaults to
ALSO so it will try to update the view itself the DO
INSTEAD says not to touch the view but instead of that
do this stmnt.
regards,
Jaime Casanova
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com