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 |
tonna
Messages: 33 Registered: November 2009 Location: thai
|
Member |
|
|
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]
DECLARE
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);
BEGIN
:EDITMENU.F_PICTUREPATH:= V_FILE_NAME;
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');
END;
save button [when-pressed-button]
begin
INSERT INTO MENU(RESTAURANT_ID,F_NAME,F_TYPE,F_PRICE,F_DESCRIPTION,F_PICTUREPATH,F_PICTURE)
VALUES(TO_NUMBER(:GLOBAL.GLOBAL_USER_ID),:EDITMENU.F_NAME,:EDITMENU.F_TYPE,:EDITMENU.F_PRICE,:EDITMENU.F_DESCRIPTION,:EDITMENU.F_PICTUREPATH,VIMAGE);
COMMIT_FORM; // this point i don't know how can i save data together with picture that i read from datablock
end;
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...
|
|
|
|
Goto Forum:
Current Time: Tue Feb 04 04:41:51 CST 2025
|