View with "instead of" triggers but without rowid

Gorby

Member
Hi,

I have a view which is based on a cartesian product of two tables. Obviously, this view has no rowid and there is no way to have it. However, I have instead of update trigger which applies changes of one column - that's the only column I need to be able to change. I have set UniqueFields property of OracleDataSet but dataset is still not editable (CanModify is always False).

I have no problem modifying a column in SQL*Plus with a regular update SQL statement.

What should I do to get this dataset updatable in OracleDataSet? Should I create some dummy rowid column?

Thanks,
Alex
 
I tried to add dummy rowid column and dataset is updatable. In addtion, I had to make set LockingMode to lmNone because rowid was used otherwise. Update after refresh was cannot be used either because it generates statement with rowid.

IMHO. UniqueFields is enough to carry out all update, insert, delete, refresh and locking/checking operations. Why rowid is still used?
Performance considerations? Sure! However, this limits flexibility/functionality of the dataset.

Is there any way to use locking and refreshing without rowid?

Best regards,
Alex
 
If there is no rowid, then you must handle all DML actions in the OnApplyRecord event. The PkgApply demo project demonstrates this.
 
Back
Top