DBAsupport.com Forums - Powered by vBulletin
Results 1 to 1 of 1

Thread: Efficient pro*c block update algorithm, in the presense of errors

Threaded View

  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Efficient pro*c block update algorithm, in the presense of errors

    Hello
    - Upon errors in block update, pro*c's sqlca.sqlerrd[2] 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

    Thanks
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width