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
To retrieve images just press F7 & F8 in forms
No comments:
Post a Comment