Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Monday, February 27, 2012

Save Images in Database From Forms

CREATE TABLE DOCS_COMP_DOCUMENTS
(
  DOC_ID            VARCHAR2(10),
  DOC_NAME          VARCHAR2(100),
  DOC_SCANNED_COPY  LONG RAW,
  FILE_NAME        VARCHAR2(50),
  FILE_EXTENSION    VARCHAR2(3)
)

ALTER TABLE DOCS_COMP_DOCUMENTS ADD ( PRIMARY KEY (DOC_ID) );

CREATE OR REPLACE PROCEDURE Get_File_Name_Extension (p_path IN VARCHAR2,
                                                      p_filename OUT VARCHAR2,
                                                      p_extension OUT VARCHAR2)
IS
 v_path VARCHAR2(200);
 v_last_slash_position NUMBER;
 v_file_name VARCHAR2(30);
 v_extension VARCHAR2(4);
BEGIN
 v_path := p_path;
 v_last_slash_position := INSTR(v_path, '\', -1) + 1;
 v_file_name := SUBSTR(v_path, v_last_slash_position);
 v_extension := SUBSTR(v_path, -3);
 p_filename := upper(v_file_name);
 p_extension := upper(v_extension);
END;

Note: This Procedure is to find the file name and extension and store it as well in database. Create this procedure in database.

To retrieve images just press F7 & F8 in forms

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect