Home » SQL & PL/SQL » SQL & PL/SQL » ORA-1779 Update of a view with more than one table
icon13.gif  ORA-1779 Update of a view with more than one table [message #205526] Sat, 25 November 2006 08:02 Go to next message
petrus
Messages: 2
Registered: November 2006
Location: Hamburg
Junior Member
We tried to update a view via RedDot RQL, but we got the following error:
Error # -2147467259 Generated by OraOLEDB Get FieldValue Description ROW-00009: Cannot update row in a read-only rowset Fieldname: SAUERKRAUT1 ADO Error # -2147467259 NativeError 9 Description ROW-00009: Cannot update row in a read-only rowset Source OraOLEDB

Update is working, if we are using only one table, but we need to have two tables minimum.

Can anyone help us ?
Mike

[Updated on: Sat, 25 November 2006 08:22]

Report message to a moderator

Re: ORA-1779 Update of a view with more than one table [message #205527 is a reply to message #205526] Sat, 25 November 2006 08:25 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
You can't update complex views.
You can use "instead of" trigger for that purpose.
An Example
By
Vamsi
icon8.gif  Re: ORA-1779 Update of a view with more than one table [message #205534 is a reply to message #205527] Sat, 25 November 2006 08:53 Go to previous message
petrus
Messages: 2
Registered: November 2006
Location: Hamburg
Junior Member

We also tried to use a trigger like this, but still same error :


VIEW1
===========================================
SELECT
wp.webname wp_webname
,wp.id wp_id
,wp.lang_lang wp_lang
,wp.cat_cat wp_cat
,wp.HIGHLIGHT1 wp_highlight1
,wp.status wp_status
,cp.parent wp_parentcat
,cp.cpid wp_cpid
FROM
webproducts wp INNER JOIN supproducts sp
ON (wp.webname = sp.supname)
INNER JOIN category_parents cp
ON (wp.cat_cat = cp.cat_cat)



create or replace TRIGGER UPD_VIEW1_TRIG INSTEAD OF UPDATE ON VIEW1 FOR EACH ROW BEGIN
update webproducts wp
set wp.highlight1 = :new.wp_highlight1
where wp.ID = :old.wp_ID;
END;

It seems, that the update via RQL (Reddot Query Language)
is not working.

Thanks,
Mike

Previous Topic: Ref Cursor
Next Topic: Different result in Oracle and SQL server
Goto Forum:
  


Current Time: Sun Dec 04 00:34:32 CST 2016

Total time taken to generate the page: 0.04177 seconds