Home » Developer & Programmer » Forms » How to view a picture from forms push button
How to view a picture from forms push button [message #86737] Wed, 27 October 2004 19:18 Go to next message
Jamal Hashmi
Messages: 7
Registered: October 2004
Junior Member
Dear Friends,

I want to view a picture or scan document from the database in any photo viewer software like ACDSee,Imaging etc. And further more I want to save it on the harddisk directly through form with the push button.
Re: How to view a picture from forms push button [message #86738 is a reply to message #86737] Wed, 27 October 2004 20:07 Go to previous messageGo to next message
ashish
Messages: 107
Registered: December 2000
Senior Member
hi
u can use the dde pkg. to view the file.. can give u can pass command to save the doc. by DDE.Execute but
u should know the save command for the application.

other wise u can use get_file_name in this set dialog_type as SAVE_FILE (user interaction must)

try this code

-***********************************************
DDE.App_Begin
-***********************************************
DECLARE
AppID PLS_INTEGER;

BEGIN

-----to open application in Maximized

message('DDE.App_Begining');
message('DDE.App_Begining');
AppID := DDE.App_Begin('C:Program FilesInternet ExplorerIEXPLORE.EXE C:My Documentslogo01.gif',DDE.APP_MODE_Maximized);

-----TO INITIATE APPLICATION

exception
when others then
message(''||sqlerrm);
message(''||sqlerrm);
END;

-***********************************************
for dde.execute
-***********************************************
DECLARE
ConvID PLS_INTEGER;
BEGIN
/* Open a DDE conversation with Microsoft Excel for Windows */
ConvID := DDE.Initiate('EXCEL', 'C:abc.xls');
/* Recalculate the Excel spreadsheet.*/
DDE.Execute(ConvID, '[[calculate.now()]]', 1000);
END;

-***********************************************
get_file_name
-***********************************************

declare
v_filename varchar2(255);
begin
v_filename := get_file_name(NULL,NULL,
'Text Files (*.Csv)&#124*.CSV|' ||
'All Files (*.*)&#124*.*|', NULL, SAVE_FILE );

:EName:= v_filename;

null;

EXCEPTION
WHEN OTHERS THEN
MESSAGE (''||SQLERRM);

end;
How to view a picture (plz reply Mr.ashish) [message #86744 is a reply to message #86738] Wed, 27 October 2004 23:59 Go to previous messageGo to next message
Jamal Hashmi
Messages: 7
Registered: October 2004
Junior Member
Ist.
Thank you Mr.ashish for the quick response.
but the confusion is that I want to save the file in hard disk from the database wheather it is a text,MS_Word,excel or immage etc file.

2ndly
how can i view these files which were saved with the concerning subject.
Re: How to view a picture (plz reply Mr.ashish) [message #86750 is a reply to message #86744] Thu, 28 October 2004 02:27 Go to previous messageGo to next message
Santhosh
Messages: 24
Registered: July 2002
Junior Member
Hi,

Create an BLOB field in the table and store the data in this particular field. So when ever you query the record the image can be viewed.

regards,
Santhosh
Re: How to view a picture (plz reply Mr.ashish) [message #86770 is a reply to message #86750] Fri, 29 October 2004 01:50 Go to previous messageGo to next message
ashish
Messages: 107
Registered: December 2000
Senior Member
u can save file if u open that file(by dde and then let the user manualy save it or first save it by open_file and then open it (in both cans it need to be done by user only).. i dont know any other way
Re: How to view a picture (plz reply Mr.ashish) [message #86771 is a reply to message #86750] Fri, 29 October 2004 01:50 Go to previous messageGo to next message
ashish
Messages: 107
Registered: December 2000
Senior Member
u can save file if u open that file(by dde and then let the user manualy save it or first save it by open_file and then open it (in both cases it need to be done by user only).. i dont know any other way
Re: How to view a picture (plz reply Mr.ashish) [message #86784 is a reply to message #86771] Sun, 31 October 2004 17:41 Go to previous message
Jamal Hashmi
Messages: 7
Registered: October 2004
Junior Member
HI,
Sir your code is ok and well enough to take a file from ur hard disk, but i need to pick a file from the data base using my form parameters with ':' sign. is there any possibility . further i am using the same procedure to save the file u write for me.

that is

declare
v_filename varchar2(255);
begin
v_filename := get_file_name(NULL,NULL,
'Text Files (*.Csv)&#124*.CSV|' ||
'All Files (*.*)&#124*.*|', NULL, SAVE_FILE );

:EName:= v_filename;

null;

EXCEPTION
WHEN OTHERS THEN
MESSAGE (''||SQLERRM);

end;
Previous Topic: picklist
Next Topic: Best Testing Tool for D2K
Goto Forum:
  


Current Time: Sat Sep 07 15:52:19 CDT 2024