Home » Developer & Programmer » Forms » insert datablock with oracle form developer suite10g (window server 2003, Oracle DB,Oracle developer suite 10g)
insert datablock with oracle form developer suite10g [message #440403] Sat, 23 January 2010 16:40 Go to next message
Messages: 33
Registered: November 2009
Location: thai

Hello , experts i got problem with insert data by use datablock with oracle form , the problem is when i want to insert data and picture together into database by press button in oracle form with this pl/sql

browse picture button [when-pressed-button]

	V_FILE_NAME VARCHAR2(300) := CLIENT_GET_FILE_NAME('C:\', NULL,'JPEG Image (*.JPG,*.JPEG,*.JPE,*.JFIF)|*.JPG|Bitmap Image (*.bmp)|*.bmp|GIF Image (*.GIF)|*.GIF|TIFF Files (*.tif)|*.tif|All Files (*.*)|*.*|', 'Browse Restuarant Picture',OPEN_FILE,TRUE);


CLIENT_IMAGE.read_image_file(V_FILE_NAME, 'JPEG Image (*.JPG,*.JPEG,*.JPE,*.JFIF)|*.JPG|Bitmap Image (*.bmp)|*.bmp|GIF Image (*.GIF)|*.GIF|TIFF Files (*.tif)|*.tif|All Files (*.*)|*.*|','EDITMENU.F_PICTURE');


 save button [when-pressed-button]



COMMIT_FORM; // this point i don't know how can i save data  together with picture that i read from datablock


the result in oracle database have 2 records , first it's only data ,second it's only picture that's in field blob ,so i want the result just have only one record that's include picture in field blob and other data in database in one record ,so how can i do i was very confuse, Could you please give me any suggestion? or how can i do make in oracle form. Thank you very much ,That's very kind of you if you answer to me. i will look forward for answer...
Re: insert datablock with oracle form developer suite10g [message #440405 is a reply to message #440403] Sat, 23 January 2010 22:30 Go to previous message
Messages: 132
Registered: October 2009
Location: Dhaka
Senior Member

u cann't use INSERT INTO command for insering an image value
(i.e BLOB data).
u can create a database block with your required table.so that
u can save an image item into your table directly.If u want to insert image vlaue by using "Insert Into" command, first u have to convert your image data(that is a BFILE data) into BLOB, after
that u can use insert into command to inserting an BLOB data.

(Remember that, when u browse an image, the data is like BFILE NOT BLOB.u must have convert BFILE to BLOB by Using DBMS_LOB package.)

please see the following link:


Previous Topic: make report for current form
Next Topic: Need F.I.F.O example
Goto Forum:

Current Time: Mon May 01 01:53:06 CDT 2017

Total time taken to generate the page: 0.04097 seconds