instead of triggers on views

Aughtly

Member
I have a view that is made up of differant tables and does some pretty difficult UNIONS and JOINS that has instead of triggers on it that allow updates.

The problem I'm having is that I would like to use the TOracleDataset so I can use some grids and such, but they need to be UPDATEABLE. I keep getting "ORA-01446 Cannot select rowid from a view containing Order by, Joins, etc."

The native dataset in Delphi has the UPDATE component that you can do alternative methods to updates (IE: SQL updates rather then row update so the use of the rowid is not needed).

Is there a way to get around or achieve the samething in the data aware DOA component?
 
For views with an instead of trigger, you need to set the UniqueFields property of the dataset to the fieldnames that uniquely a row. These UniqueFields will be used to obtain the rowid.

If you need to do more complicated processing than a single insert, update or delete when a record is applied, you can use the OnApplyRecord event. This will probably not be necessary here, as I assume that your instead of trigger takes care of that.

------------------
Marco Kalter
Allround Automations
 
Back
Top