How to view a picture from forms push button [message #86737] |
Wed, 27 October 2004 19:18 |
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 |
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)|*.CSV|' ||
'All Files (*.*)|*.*|', 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 |
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 #86784 is a reply to message #86771] |
Sun, 31 October 2004 17:41 |
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)|*.CSV|' ||
'All Files (*.*)|*.*|', NULL, SAVE_FILE );
:EName:= v_filename;
null;
EXCEPTION
WHEN OTHERS THEN
MESSAGE (''||SQLERRM);
end;
|
|
|