Skip to Main Content

Oracle Forms

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

FRM-10764

ozsunSep 13 2008 — edited Sep 14 2008
Hello, I created a table and procedure for inserting large objects (images, documents..)into table and it works fine,
but now I want to create a form based on that procedure so that I can insert data with it.... but I am getting error FRM-10764,
I simplu do not understand how to add an argument of type TABLE or REFCURSOR to the procedure...below is the code for table and procedure :

CREATE TABLE MY_DOCS
(
DOC_ID NUMBER,
BFILE_LOC BFILE,
DOC_TITLE VARCHAR2(255 BYTE),
DOC_BLOB BLOB DEFAULT EMPTY_BLOB()
)




CREATE OR REPLACE PROCEDURE TESTFORMS.load (in_doc IN VARCHAR2, in_id IN NUMBER) IS

temp_blob BLOB := empty_blob();

bfile_loc BFILE;


BEGIN
bfile_loc := BFILENAME('DOC_DIR', in_doc);
INSERT INTO my_docs (doc_id, bfile_loc, doc_title) VALUES (in_id, bfile_loc, in_doc);
SELECT doc_blob INTO temp_blob FROM my_docs WHERE doc_id = in_id FOR UPDATE;
DBMS_LOB.OPEN(bfile_loc, DBMS_LOB.LOB_READONLY);
DBMS_LOB.OPEN(temp_blob, DBMS_LOB.LOB_READWRITE);
DBMS_LOB.LOADFROMFILE(temp_blob, bfile_loc, dbms_lob.getlength(bfile_loc));

DBMS_LOB.CLOSE(temp_blob);

DBMS_LOB.CLOSE(bfile_loc);

COMMIT;
END load;
/


regards,

edo

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 12 2008
Added on Sep 13 2008
2 comments
643 views