Home » Developer & Programmer » Forms » I am unable to insert image file while using BLOB Data type with the following code:
I am unable to insert image file while using BLOB Data type with the following code: [message #381930] Tue, 20 January 2009 06:00 Go to next message
mnashraf
Messages: 1
Registered: January 2009
Location: Karachi
Junior Member
I am unable to insert image file while using BLOB Data type with the following code:
GO_ITEM('EMP_TEST.BLOB_PIC');
DECLARE
Emp VARCHAR2(100);
BEGIN
Emp := 'D:\Famco\scott_pic\' || :empno||'.jpg';
Read_Image_File(Emp, 'JPG', 'EMP_TEST_BLOB.BLOB_PIC');
IF NOT Form_Success
THEN
Message('There is no such picture');
Message('There is no such picture');
ELSE
DECLARE
Ia VARCHAR2(255);
Path1 VARCHAR2(100);
BEGIN
Path1 := 'D:\Famco\scott_pic\';
Ia := Get_File_Name(Path1,
File_Filter => 'JPG Files (*.jpg)/*.jpg/ All Files (*.*)/*.*/');
Read_Image_File(Ia, 'JPG','EMP_TEST_BLOB.BLOB_PIC');
END;
END IF;
END;
The image displayed into image container in forms6i and when I prssed save button it showed me that record has been saved but when I querried again after clearing record no image displayed and I noticed it did not go to database actually.
I am using Oracle Forms
Forms [32 Bit] Version 6.0.8.11.3
Oracle9i Enterprise Edition Release 9.2.0.1.0
Please help me in this regard.
Re: I am unable to insert image file while using BLOB Data type with the following code: [message #382342 is a reply to message #381930] Thu, 22 January 2009 00:13 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I suggest searching this forum for 'Read_Image_File' and 'Get_File_Name' and see how other people have written their code.

David
Previous Topic: A different color each record
Next Topic: how to change rotation angle of arc at runtime
Goto Forum:
  


Current Time: Fri Dec 09 07:54:31 CST 2016

Total time taken to generate the page: 0.09449 seconds