Home » Developer & Programmer » Forms » Save Images in Database From Forms - Download it Here
Save Images in Database From Forms - Download it Here [message #163347] Thu, 16 March 2006 06:24 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Hi Everyone,
I have seen many times that people are confused for how to save and retrieve images in Oracle Database from forms.
Here I have created a sample form. All the coding is there. And also required scripts are also written in this post. Please download the form create the scripts and run the form.
Here we go:
Database : 9i
Forms : 6i
Create Scripts:
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 Cool

Please downlad the attached .fmb module and run it. Enjoy your time.

Thanks and Regards,
Saadat Ahmad,
saadatahmad@hotmail.com[/email] For any question regarding this module.

[Updated on: Sun, 03 January 2010 23:31] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FRM-40501 and ORA-00054
Next Topic: "FRM 18108 failed to load the following objects" to open in windows oracle forms 12c
Goto Forum:
  


Current Time: Thu Aug 06 20:20:36 CDT 2020