Home » Developer & Programmer » Forms » document is not open [merged 2 by jd] (oracle,oracle 6i,windows Xp)
document is not open [merged 2 by jd] [message #625844] |
Wed, 15 October 2014 00:52 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
hi pls help
i am using when_button_pressed trigger for open the particular document but while click the button there is no response pls some one help me..
using query..
DECLARE
in_file TEXT_IO.FILE_TYPE ;
linebuf VARCHAR2(80);
file_path varchar2(300) ;
fpath varchar2(15);
a number;
begin
BEGIN
SELECT PATH_DESC INTO FILE_PATH FROM IMAGE_PATH WHERE IMAGE_TYPE = 'SCANNED' ;
EXCEPTION WHEN NO_DATA_FOUND THEN
RAISE FORM_TRIGGER_FAILURE ;
END ;
select path into fpath from image_folder where scan_year =substr(:b010.job_no,1,4) and from_no<=substr(:b010.job_no,6,9)
and to_no>=substr(:b010.job_no,6,9);
file_path:=file_path||substr(:b010.job_no,1,4)||'\'||fpath||'\'||:b010.job_no||'\'||:b010.job_no||'.tif';
BEGIN
in_file := TEXT_IO.FOPEN(FILE_PATH, 'r');
EXCEPTION WHEN OTHERS THEN
IF SQLCODE = -302000 then
a:=show_alert('scanned');
END IF;
end;
end;
declare
OS_name VARCHAR2(40);
file_path varchar2(100) ;
v_server_app varchar2(40);
v_server_tag varchar2(600);
v_command varchar2(2000);
v_arg_pos pls_integer;
fpath varchar2(100) ;
thefile text_io.file_type;
begin
thefile:= text_io.fopen('c:\JOB.BAT', 'w');
Begin
v_server_tag := 'HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE' ;
v_command := win_api_environment.read_registry(v_server_tag,'ORACLE_HOME',true);
v_arg_pos := instr(upper(v_command),'95');
if v_arg_pos > 0 then
OS_NAME := '95' ;
else
OS_NAME := 'NT' ;
end if ;
Exception when Others then null ;
End ;
BEGIN
SELECT PATH_DESC INTO FILE_PATH FROM IMAGE_PATH WHERE IMAGE_TYPE = 'SCANNED' ;
EXCEPTION WHEN NO_DATA_FOUND THEN
RAISE FORM_TRIGGER_FAILURE ;
END ;
select path into fpath from image_folder where scan_year =substr(:b010.job_no,1,4) and from_no<=substr(:b010.job_no,6,9)
and to_no>=substr(:b010.job_no,6,9);
file_path:=file_path||substr(:b010.job_no,1,4)||'\'||fpath;
if os_name = 'NT' then
file_path := FILE_PATH ||'\'|| :B010.JOB_NO||'\'||:B010.JOB_NO||'.tif' ;
else
file_path := '..\KODAKPRV ' || FILE_PATH ||'\'|| :B010.JOB_NO||'\'||:B010.JOB_NO||'.tif' ;
end if;
text_io.put_line(thefile, '@Echo OFF');
text_io.put_line(thefile,file_path);
text_io.fclose(theFile);
host('c:\JOB.BAT');
EXCEPTION WHEN FORM_TRIGGER_FAILURE THEN
:CNT_BLK.MSGFLD := 'MISSING PATH .. CANNOT RETRIEVE PATH ' ;
when no_Data_found then pause;
end ;
Edited by Lalit : Added code tags to preserve code formatting
[Updated on: Wed, 15 October 2014 01:01] by Moderator Report message to a moderator
|
|
|
|
|
oracle 6i forms file not open very urgent [message #625895 is a reply to message #625844] |
Wed, 15 October 2014 10:50 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
|
Hi
please i am using oracle 6i forms and i want to open following format file like pdf or tif or jpeg.
i am using when-button-pressed trigger but while clicking the button there is no response pls help me very urgent.
below the query i am using the when-button-pressed-trigger
DECLARE
in_file TEXT_IO.FILE_TYPE ;
linebuf VARCHAR2(80);
file_path varchar2(300) ;
fpath varchar2(15);
a number;
begin
BEGIN
SELECT PATH_DESC INTO FILE_PATH FROM IMAGE_PATH WHERE IMAGE_TYPE = 'SCANNED' ;
EXCEPTION WHEN NO_DATA_FOUND THEN
RAISE FORM_TRIGGER_FAILURE ;
END ;
select path into fpath from image_folder where scan_year =substr(:b010.job_no,1,4) and from_no<=substr(:b010.job_no,6,9)
and to_no>=substr(:b010.job_no,6,9);
file_path:=file_path||substr(:b010.job_no,1,4)||'\'||fpath||'\'||:b010.job_no||'\'||:b010.job_no||'.tif';
BEGIN
in_file := TEXT_IO.FOPEN(FILE_PATH, 'r');
EXCEPTION WHEN OTHERS THEN
IF SQLCODE = -302000 then
a:=show_alert('scanned');
END IF;
end;
end;
declare
OS_name VARCHAR2(40);
file_path varchar2(100) ;
v_server_app varchar2(40);
v_server_tag varchar2(600);
v_command varchar2(2000);
v_arg_pos pls_integer;
fpath varchar2(100) ;
thefile text_io.file_type;
begin
thefile:= text_io.fopen('c:\JOB.BAT', 'w');
Begin
v_server_tag := 'HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE' ;
v_command := win_api_environment.read_registry(v_server_tag,'ORACLE_HOME',true);
v_arg_pos := instr(upper(v_command),'95');
if v_arg_pos > 0 then
OS_NAME := '95' ;
else
OS_NAME := 'NT' ;
end if ;
Exception when Others then null ;
End ;
BEGIN
SELECT PATH_DESC INTO FILE_PATH FROM IMAGE_PATH WHERE IMAGE_TYPE = 'SCANNED' ;
EXCEPTION WHEN NO_DATA_FOUND THEN
RAISE FORM_TRIGGER_FAILURE ;
END ;
select path into fpath from image_folder where scan_year =substr(:b010.job_no,1,4) and from_no<=substr(:b010.job_no,6,9)
and to_no>=substr(:b010.job_no,6,9);
file_path:=file_path||substr(:b010.job_no,1,4)||'\'||fpath;
if os_name = 'NT' then
file_path := FILE_PATH ||'\'|| :B010.JOB_NO||'\'||:B010.JOB_NO||'.tif' ;
else
file_path := '..\KODAKPRV ' || FILE_PATH ||'\'|| :B010.JOB_NO||'\'||:B010.JOB_NO||'.tif' ;
end if;
text_io.put_line(thefile, '@Echo OFF');
text_io.put_line(thefile,file_path);
text_io.fclose(theFile);
host('c:\JOB.BAT');
EXCEPTION WHEN FORM_TRIGGER_FAILURE THEN
:CNT_BLK.MSGFLD := 'MISSING PATH .. CANNOT RETRIEVE PATH ' ;
when no_Data_found then pause;
end ;
|
|
|
Goto Forum:
Current Time: Mon Sep 09 08:38:14 CDT 2024
|