I'm accessing Oracle data using oo4o VB. Here's the problem:
I'd like to update the unique keys like below. How would I
implement it using oo40 oradynaset. If it can't be done,
how to implement it in ADO?
If the unique constraint has been defined as DEFERRABLE than you could set it to DEFERRED before doing the updates; that way it will not be checked until you commit all the changes, at which time all the keys will be unique again.
Alternatively, you can just introduce a dummy key value:
The table used is variable, could be deferrable or not deferrable
so I can't use that option. The recordset is actually used in a
grid (TDBGrid), everytime I edit and change row, I must change the
source data (recordset) somehow temporarily so that cell display
will not revert to original value. Isn't there some kind of batch
update in oo4o? In ADO, will adLockBatchOptimistic do the trick?
Will adLockBatchOptimistic work in Oracle db?
Have tried adLockBatchOptimistic in ADO recordset.
Then issued .BatchUpdate after I have finished editing
the rows. Still there was primary key violation error
from Oracle. It seems BatchUpdate still updates the
changes by row.