Results 1 to 5 of 5

Thread: error help

  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Unanswered: error help

    can anyone explain this error to me when i am inserting image into database.
    PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275
    thanks

  2. #2
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    From the documentation:

    ORA-22275 invalid LOB locator specified

    Cause:
    There are several causes:
    1. The LOB locator was never initialized
    2. The locator is for a BFILE and the routine expects a BLOB/CLOB/NCLOB locator
    3. The locator is for a BLOB/CLOB/NCLOB and the routine expects a BFILE locator
    4. Trying to update the LOB in a trigger body -- LOBs in trigger bodies are read-only
    5. The locator is for a BFILE/BLOB and the routine expects a CLOB/NCLOB locator
    6. The locator is for a CLOB/NCLOB and the routine expects a BFILE/BLOB locator

    Action: For (1), initialize the LOB locator by selecting into the locator variable or by setting the LOB locator to empty. For (2),(3), (5), and (6),pass the correct type of locator into the routine. For (4), remove the trigger body code that updates the LOB value.

  3. #3
    Join Date
    Dec 2004
    Location
    Memphis
    Posts
    25
    Hi..

    William, you're bit faster then I... Anyway..

    First Try William Suggestions..

    Swakoo, We can assist you better if you show us PL /SQL blocks ? Also, did you store image in the column of BLOB type or LONG RAW type?
    NewKid

    A Newkid in the block

  4. #4
    Join Date
    Nov 2004
    Posts
    35
    this is the method i called.
    sp_photo_insert('abc.jpg', result);
    PROCEDURE sp_photo_insert(photoname IN varchar2, result OUT varchar2)
    IS
    dest_lob blob;
    v_check integer;
    src_lob bfile:= bfilename('PIC_DIR',photoname);
    amt integer := dbms_lob.getlength(src_lob);


    BEGIN

    SELECT scan_pic INTO dest_lob FROM tb_person FOR UPDATE;

    dbms_lob.fileopen(src_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile(dest_lob,src_lob,amt);
    dbms_lob.fileclose(src_lob);
    return 'success'
    ENd;

    thanks

  5. #5
    Join Date
    Nov 2004
    Posts
    35
    btw my error is at dbms_lob.loadfromfile(dest_lob,src_lob,amt);
    and my column is of datatype blob.
    Last edited by swakoo; 12-21-04 at 21:15.

Posting Permissions

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