DBA Data[Home] [Help]

APPS.CTO_UTILITY_PK dependencies on DBMS_LOB

Line 3982: l_lob_length := dbms_lob.getlength(l_blob_loc);

3978: oe_debug_pub.add('get_cto_item_attachment: ' || 'File attachment is null. Nothing to convert to clob... returning null', 1);
3979: return null;
3980: end if;
3981:
3982: l_lob_length := dbms_lob.getlength(l_blob_loc);
3983: l_input_offset := 1;
3984:
3985: DBMS_LOB.CREATETEMPORARY(l_clob_loc, TRUE, DBMS_LOB.SESSION);
3986: DBMS_LOB.OPEN (l_clob_loc, DBMS_LOB.LOB_READWRITE);

Line 3985: DBMS_LOB.CREATETEMPORARY(l_clob_loc, TRUE, DBMS_LOB.SESSION);

3981:
3982: l_lob_length := dbms_lob.getlength(l_blob_loc);
3983: l_input_offset := 1;
3984:
3985: DBMS_LOB.CREATETEMPORARY(l_clob_loc, TRUE, DBMS_LOB.SESSION);
3986: DBMS_LOB.OPEN (l_clob_loc, DBMS_LOB.LOB_READWRITE);
3987:
3988: -- Loop through the blob, and convert and copy to clob in smaller chunks.
3989:

Line 3986: DBMS_LOB.OPEN (l_clob_loc, DBMS_LOB.LOB_READWRITE);

3982: l_lob_length := dbms_lob.getlength(l_blob_loc);
3983: l_input_offset := 1;
3984:
3985: DBMS_LOB.CREATETEMPORARY(l_clob_loc, TRUE, DBMS_LOB.SESSION);
3986: DBMS_LOB.OPEN (l_clob_loc, DBMS_LOB.LOB_READWRITE);
3987:
3988: -- Loop through the blob, and convert and copy to clob in smaller chunks.
3989:
3990: LOOP

Line 4003: dbms_lob.read(l_blob_loc, l_cur_chunk_size, l_input_offset, l_buf_raw);

3999: ELSE
4000: l_cur_chunk_size := l_lob_length - l_input_offset + 1;
4001: END IF;
4002:
4003: dbms_lob.read(l_blob_loc, l_cur_chunk_size, l_input_offset, l_buf_raw);
4004:
4005: l_buffer := utl_raw.cast_to_varchar2(l_buf_raw);
4006:
4007: -- Write the current chunk.

Line 4008: DBMS_LOB.writeappend(l_clob_loc, length(l_buffer), l_buffer);

4004:
4005: l_buffer := utl_raw.cast_to_varchar2(l_buf_raw);
4006:
4007: -- Write the current chunk.
4008: DBMS_LOB.writeappend(l_clob_loc, length(l_buffer), l_buffer);
4009:
4010: -- Increment the input offset by the current chunk size.
4011: l_input_offset := l_input_offset + l_cur_chunk_size;
4012:

Line 4015: DBMS_LOB.CLOSE (l_clob_loc);

4011: l_input_offset := l_input_offset + l_cur_chunk_size;
4012:
4013: END LOOP;
4014:
4015: DBMS_LOB.CLOSE (l_clob_loc);
4016:
4017: return l_clob_loc;
4018:
4019: Exception