|
|
Re: host problem in forms 10g at the time of form run on web web application [message #525107 is a reply to message #525001] |
Thu, 29 September 2011 02:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/f6bf2971999d347c1668a0ea362d9397?s=64&d=mm&r=g) |
devendrapal26
Messages: 15 Registered: March 2011 Location: india
|
Junior Member |
![orkut](/forum/theme/orafaq/images/google.png)
|
|
thank you sir for giving me responce......
i read about webutil, but i don't know how to use it in my form...
will u please give me some example for this......
my code is
----------------------
PROCEDURE create_batch_file IS
in_file Text_IO.File_Type;
linebuf VARCHAR2(5000);
in_file2 Text_IO.File_Type;
linebuf2 VARCHAR2(5000);
timer_id timer;
l_record_number number(3):=0;
t_file_path varchar2(500);
L_EXE_NAME varchar2(200);
begin
:parameter.p_drive:='S:\';
:parameter.p_folder:='GLOBAL\LHSG_D\HOUSE\'; --t_folder:='GROUPS\LGAM_\HOUSE';
:parameter.p_batch_file:=:PB_BLOCK.TAKENBY||'.bat';
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
in_file := Text_IO.Fopen(:parameter.p_drive||:parameter.p_folder||:parameter.p_batch_file, 'W');
if Not Text_Io.is_open(in_file) Then
lhs_lib.msgbox('Some Error in Opening the batch file.');
lhs_lib.msgbox('Some person is using the file. Please try later');
raise form_trigger_failure;
end if;
Go_Block('daily_transfer_tran');
First_record;
LOOP
IF INSTR('1,2,5',:QC_FLAG ) <> 0 THEN
t_FILE_PATH:=substr(:daily_transfer_tran.file_path,3);
linebuf :='XCOPY '||'W:'||t_file_path||:daily_transfer_tran.object_name||' '||'S:'||t_file_path||' /s/c/y/i';
Text_IO.PUT_Line(in_file,linebuf);
l_record_number :=1;
select replace(replace(replace(replace(:daily_transfer_tran.object_name,'.FMB','.FMX'),'.RDF','.REP'),'.MMB','.MMX'),'.PLL','.PLX') INTO L_EXE_NAME FROM DUAL;
IF l_exe_name IS NOT NULL THEN
linebuf :='XCOPY '||'W:'||t_file_path||l_exe_name||' '||'S:'||t_file_path||' /s/c/y/i'; ---:daily_transfer_tran.object_name||
Text_IO.PUT_Line(in_file,linebuf);
END IF;
IF SUBSTR(:daily_transfer_tran.object_name,-3) IN ('FMB','RDF','PLL','MMB') THEN
linebuf :='DEL '||'W:'||t_file_path||:daily_transfer_tran.object_name;
Text_IO.PUT_Line(in_file,linebuf);
END IF;
END IF;
If :system.last_record = 'FALSE' THEN
Next_record;
Else
Exit;
End IF;
End LOOP;
-- END LOOP;
CLEAR_MESSAGE;
Text_IO.Fclose (in_file);
if l_record_number = 0 then
:parameter.p_batch_file:=null;
end if;
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
-- lhs_lib.msgbox(' Batch File Generated.');
EXCEPTION
WHEN OTHERS THEN
MESSAGE('Some Error in generating batch file '||SQLERRM);
raise form_trigger_failure;
end;
--------------------------
|
|
|
|