CachedUpdates without ROWID

KAndrew

Member
Hello Marco!

Are You planning release the CachedUpdates based on TOracleDataSet.UniqueFields? The ROWID is not suitable for any needs, e.g. updates Views with instead of triggers.

Andrew.
 
For views with instead of triggers you can still obtain a rowid. You must set the UniqueFields though.

------------------
Marco Kalter
Allround Automations
 
Hi!
If view has DISTINCT, GROUP BY, UNION clause and join several tables all update logic release in instead of trigger, so ROWID cached updates works only with one updating table. I must specify UpdatingTable for CashedUpdates and DOA produce this statements:

DOA DMLQuery

1) select * from UpdatingTable where rowid = :doa__rowid
2) savepoint DOA_APPLYPOINT
3) select * from UpdatingTable where rowid = :doa__rowid for update nowait
4) update UpdatingTable set FieldName = :FieldName where rowid = :doa__rowid
5) commit;

If UpdatingTable is complex view then Oracle raise ORA-01446.

If UpdatingTable is one of the view's table,
I can update only one, instead of triggers not fired.

With unique fields

select * from UpdatingTable where UniqueFieldName1 = :UniqueFieldName1
[and
UniqueFieldName2 = :UniqueFieldName2
..]
and so on..

This statements solve the problem.
This would be a great feature!

Regards,
Andrew.
 
HI ,
thats exactly my Problem with rowid.
My wish is, ti make the ROWID changable to another unique Field like any PK.
I think it will also not work in a nonchached Update!

I guess, that the changes are not so heavy,change the STRING ROWID in the units to a classproperty and set this property. (Maybe FROWIDFIELD='ID' or so)

Thanks a million
Andreas

Originally posted by KAndrew:
Hi!
If view has DISTINCT, GROUP BY, UNION clause and join several tables all update logic release in instead of trigger, so ROWID cached updates works only with one updating table. I must specify UpdatingTable for CashedUpdates and DOA produce this statements:

DOA DMLQuery

1) select * from UpdatingTable where rowid = :doa__rowid
2) savepoint DOA_APPLYPOINT
3) select * from UpdatingTable where rowid = :doa__rowid for update nowait
4) update UpdatingTable set FieldName = :FieldName where rowid = :doa__rowid
5) commit;

If UpdatingTable is complex view then Oracle raise ORA-01446.

If UpdatingTable is one of the view's table,
I can update only one, instead of triggers not fired.

With unique fields

select * from UpdatingTable where UniqueFieldName1 = :UniqueFieldName1
[and
UniqueFieldName2 = :UniqueFieldName2
..]
and so on..

This statements solve the problem.
This would be a great feature!

Regards,
Andrew.
 
Hello Marco!

I think, It's nessesary to introduce new property in the TOracleDataset, which determinate what kind of updates used: ROWID
or UniqueFields (UpdateKind ?). There are no any difficulties to implement "UniqueFields" updates. I'm glad to help you.

---------------------------------------------
Regards,
Andrew.
 
Back
Top