Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-21560: argument 3 is null, invalid, or out of range

ma434554anSep 15 2017 — edited Sep 15 2017

Dears,

kindly note that when i try to attache file to blob column using below i got error:

ORA-21560: argument 3 is null, invalid, or out of range

***********************************************************

DECLARE

    lBlob  BLOB;

    lFile  BFILE := BFILENAME('DIST', 'TEST2.DOCX');

BEGIN

    INSERT INTO MD.PCS_REPORTS (id, ATTACHE)

        VALUES (20000, empty_blob())

        RETURNING ATTACHE INTO lBlob;

    DBMS_LOB.OPEN(lFile, DBMS_LOB.LOB_READONLY);

    DBMS_LOB.OPEN(lBlob, DBMS_LOB.LOB_READWRITE);

    DBMS_LOB.LOADFROMFILE(DEST_LOB => lBlob,

                          SRC_LOB  => lFile,

                          AMOUNT   => DBMS_LOB.GETLENGTH(lFile));

    DBMS_LOB.CLOSE(lFile);

    DBMS_LOB.CLOSE(lBlob);

    COMMIT;

END;

/

when i run

select BFILENAME('DIST', 'TEST4.DOCX') from dual

i got below result :

DIST//TEST4.DOCX

appreciating your support.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2017
Added on Sep 15 2017
3 comments
2,733 views