Efficient pro*c block update algorithm, in the presense of errors
- Upon errors in block update, pro*c's sqlca.sqlerrd tells how many records were update.
Question 1) Is there a way to know what specific records failed at a block update?
- I am looking for optimized code for block update,
after a block update error, where at least one record was not updated,
because it does not have a record at the table (or because it violates the primary key,).
- In this case, my code does block insert, See following bad_existing_block_update()
but only some of the missing records are inserted and not all of them.
- Per record insert, See following too_heavy_block_update()
manages to insert all missing records,
but this is too heavy for my application.
Question 2) Is there an efficient way to insert only missing records, See following wished_block_update()
Question 3) Will per-record-update update any record that was not updated by the block update?
Question 4) Can you explain Oracle/pro*c algorithm for block-update, concerning update errors?
Please See code attached file update.txt
Click Here to Expand Forum to Full Width