DBA Data[Home] [Help]

APPS.FND_GFM dependencies on DBMS_LOB

Line 380: select dbms_lob.getlength(blob_content), mime_type

376:
377: fn := SUBSTR(confirm_upload.file_name, INSTR(confirm_upload.file_name,'/')+1);
378:
379: -- bug 3045375, added select to get length of BLOB.
380: select dbms_lob.getlength(blob_content), mime_type
381: into bloblength, mt
382: from fnd_lobs_document
383: where name = confirm_upload.file_name
384: and rownum=1;

Line 804: dbms_lob.write(flob,1000,fh.offset, convert(l_str,ocs));

800:
801: -- BUG#1449494, created while loop to bypass convert() limitation.
802: while (l_len > 1000) loop
803: l_str := utl_raw.substr(buffer,l_pos, 1000);
804: dbms_lob.write(flob,1000,fh.offset, convert(l_str,ocs));
805: l_pos := l_pos + 1000;
806: l_len := l_len - 1000;
807: fh.offset := fh.offset + 1000;
808: end loop;

Line 810: dbms_lob.write(flob, l_len, fh.offset, convert(l_str,ocs));

806: l_len := l_len - 1000;
807: fh.offset := fh.offset + 1000;
808: end loop;
809: l_str := utl_raw.substr(buffer, l_pos);
810: dbms_lob.write(flob, l_len, fh.offset, convert(l_str,ocs));
811: fh.offset := fh.offset + l_len;
812: open_file_handles(fd) := fh;
813: commit;
814: exception

Line 1020: dbms_lob.createtemporary(lob_loc,TRUE);

1016: if (pn = 'export' and nce is not null) then
1017: cs := fnd_gfm.oracle_to_iana(nce);
1018: nce := 'american_america.'||nce;
1019: ocs := 'american_america.'||ocs;
1020: dbms_lob.createtemporary(lob_loc,TRUE);
1021: dbms_lob.open(doc, DBMS_LOB.LOB_READONLY);
1022: len := dbms_lob.getlength(doc);
1023: loop
1024: if len > amount

Line 1021: dbms_lob.open(doc, DBMS_LOB.LOB_READONLY);

1017: cs := fnd_gfm.oracle_to_iana(nce);
1018: nce := 'american_america.'||nce;
1019: ocs := 'american_america.'||ocs;
1020: dbms_lob.createtemporary(lob_loc,TRUE);
1021: dbms_lob.open(doc, DBMS_LOB.LOB_READONLY);
1022: len := dbms_lob.getlength(doc);
1023: loop
1024: if len > amount
1025: then

Line 1022: len := dbms_lob.getlength(doc);

1018: nce := 'american_america.'||nce;
1019: ocs := 'american_america.'||ocs;
1020: dbms_lob.createtemporary(lob_loc,TRUE);
1021: dbms_lob.open(doc, DBMS_LOB.LOB_READONLY);
1022: len := dbms_lob.getlength(doc);
1023: loop
1024: if len > amount
1025: then
1026: dbms_lob.read(doc, amount, offset, buffer);

Line 1026: dbms_lob.read(doc, amount, offset, buffer);

1022: len := dbms_lob.getlength(doc);
1023: loop
1024: if len > amount
1025: then
1026: dbms_lob.read(doc, amount, offset, buffer);
1027: var :=utl_raw.cast_to_varchar2(buffer);
1028: lenvarb :=lengthb(var);
1029: if length(var) > 10
1030: then

Line 1037: dbms_lob.write(lob_loc, b_amount, offset2, buffer);

1033: lenvarb := lenvarb - lengthb(var);
1034: buffer := utl_raw.cast_to_raw(var);
1035: buffer := utl_raw.convert(buffer, nce, ocs);
1036: b_amount := utl_raw.length(buffer);
1037: dbms_lob.write(lob_loc, b_amount, offset2, buffer);
1038: len := len - amount + lenvarb;
1039: offset := offset + amount - lenvarb;
1040: offset2 := offset2 + b_amount;
1041: else

Line 1042: dbms_lob.read(doc, len, offset, buffer);

1038: len := len - amount + lenvarb;
1039: offset := offset + amount - lenvarb;
1040: offset2 := offset2 + b_amount;
1041: else
1042: dbms_lob.read(doc, len, offset, buffer);
1043: buffer := utl_raw.convert(buffer, nce, ocs);
1044: amount := utl_raw.length(buffer);
1045: dbms_lob.write(lob_loc, amount, offset2, buffer);
1046: exit;

Line 1045: dbms_lob.write(lob_loc, amount, offset2, buffer);

1041: else
1042: dbms_lob.read(doc, len, offset, buffer);
1043: buffer := utl_raw.convert(buffer, nce, ocs);
1044: amount := utl_raw.length(buffer);
1045: dbms_lob.write(lob_loc, amount, offset2, buffer);
1046: exit;
1047: end if;
1048: end loop;
1049: end if;

Line 1060: htp.p( 'Content-length: ' || dbms_lob.getlength(lob_loc));

1056: htp.p('Content-Disposition: attachment; filename='||'"'||fn||'"');
1057: end if;
1058:
1059: if (pn = 'export' and nce is not null) then
1060: htp.p( 'Content-length: ' || dbms_lob.getlength(lob_loc));
1061: else
1062: htp.p( 'Content-length: ' || dbms_lob.getlength(doc));
1063: end if;
1064: /* Commenting out the following do resolve the issue with Export

Line 1062: htp.p( 'Content-length: ' || dbms_lob.getlength(doc));

1058:
1059: if (pn = 'export' and nce is not null) then
1060: htp.p( 'Content-length: ' || dbms_lob.getlength(lob_loc));
1061: else
1062: htp.p( 'Content-length: ' || dbms_lob.getlength(doc));
1063: end if;
1064: /* Commenting out the following do resolve the issue with Export
1065: failing on Internet Explorer.
1066: htp.p( 'Cache-Control: no-cache' ); */

Line 1070: dbms_lob.freetemporary(lob_loc);

1066: htp.p( 'Cache-Control: no-cache' ); */
1067: owa_util.http_header_close;
1068: if (pn = 'export' and nce is not null) then
1069: wpg_docload.download_file(lob_loc);
1070: dbms_lob.freetemporary(lob_loc);
1071: dbms_lob.close(doc);
1072: else
1073: wpg_docload.download_file(doc);
1074: end if;

Line 1071: dbms_lob.close(doc);

1067: owa_util.http_header_close;
1068: if (pn = 'export' and nce is not null) then
1069: wpg_docload.download_file(lob_loc);
1070: dbms_lob.freetemporary(lob_loc);
1071: dbms_lob.close(doc);
1072: else
1073: wpg_docload.download_file(doc);
1074: end if;
1075:

Line 1453: DBMS_LOB.OPEN (l_blob_loc, DBMS_LOB.LOB_READWRITE);

1449: select file_data into l_blob_loc from fnd_lobs
1450: where file_id = fid;
1451:
1452:
1453: DBMS_LOB.OPEN (l_blob_loc, DBMS_LOB.LOB_READWRITE);
1454:
1455: -- First determine the input LOB length.
1456: v_LOBLength := DBMS_LOB.GETLENGTH(my_clob);
1457:

Line 1456: v_LOBLength := DBMS_LOB.GETLENGTH(my_clob);

1452:
1453: DBMS_LOB.OPEN (l_blob_loc, DBMS_LOB.LOB_READWRITE);
1454:
1455: -- First determine the input LOB length.
1456: v_LOBLength := DBMS_LOB.GETLENGTH(my_clob);
1457:
1458: -- Set up the initial offsets. The input offset starts at the
1459: -- beginning, the output offset at the end.
1460: v_InputOffset := 1;

Line 1476: dbms_lob.read(my_clob, v_CurrentChunkSize, v_InputOffset, varbuf);

1472: ELSE
1473: v_CurrentChunkSize := v_LOBLength - v_InputOffset + 1;
1474: END IF;
1475:
1476: dbms_lob.read(my_clob, v_CurrentChunkSize, v_InputOffset, varbuf);
1477:
1478: -- Write the current chunk.
1479: DBMS_LOB.writeappend(l_blob_loc, lengthb(varbuf), UTL_RAW.cast_to_raw(varbuf));
1480:

Line 1479: DBMS_LOB.writeappend(l_blob_loc, lengthb(varbuf), UTL_RAW.cast_to_raw(varbuf));

1475:
1476: dbms_lob.read(my_clob, v_CurrentChunkSize, v_InputOffset, varbuf);
1477:
1478: -- Write the current chunk.
1479: DBMS_LOB.writeappend(l_blob_loc, lengthb(varbuf), UTL_RAW.cast_to_raw(varbuf));
1480:
1481: -- Increment the input offset by the current chunk size.
1482: v_InputOffset := v_InputOffset + v_CurrentChunkSize;
1483: END LOOP;

Line 1485: DBMS_LOB.CLOSE(l_blob_loc);

1481: -- Increment the input offset by the current chunk size.
1482: v_InputOffset := v_InputOffset + v_CurrentChunkSize;
1483: END LOOP;
1484:
1485: DBMS_LOB.CLOSE(l_blob_loc);
1486: --return x_return_status;
1487:
1488: exception
1489: when G_EXC_ERROR then