C clivew Member² Nov 21, 2000 #1 How best can I update a table with a BLOB field when I also want to update other fields? The only example I found only updated the LOB field and used SELECT...FOR UPDATE. Thanks - Clive
How best can I update a table with a BLOB field when I also want to update other fields? The only example I found only updated the LOB field and used SELECT...FOR UPDATE. Thanks - Clive
Marco Kalter Administrator Staff member Nov 23, 2000 #1 The 'select for update' in the example has 2 purposes: 1. Lock the record (required if you want to write LOB data) 2. Obtain the LOB Locator If you also want to update other columns, you can easily combine things: Code: update lob_table set col1 = :var1, col2 = :var2, lob_column = empty_blob() returning lob_column into :lob_variable Click to expand... Now you have updated the columns, locked the record, and obtained the LOB Locator. You can subsequently use this LOB Locator to write the new data. ------------------ Marco Kalter Allround Automations
The 'select for update' in the example has 2 purposes: 1. Lock the record (required if you want to write LOB data) 2. Obtain the LOB Locator If you also want to update other columns, you can easily combine things: Code: update lob_table set col1 = :var1, col2 = :var2, lob_column = empty_blob() returning lob_column into :lob_variable Click to expand... Now you have updated the columns, locked the record, and obtained the LOB Locator. You can subsequently use this LOB Locator to write the new data. ------------------ Marco Kalter Allround Automations