How to run the application using "host" command ? [message #168393] |
Thu, 20 April 2006 03:36 |
Catty
Messages: 64 Registered: April 2006 Location: Poland
|
Member |
|
|
Hi everyone!!
I had built an appliction in Forms 6.0. I have menu that contains position "File viev". I create file .txt and after, I want to see how it looks. I'm using a little application make in C (tview.exe), to display this txt file. I call :
tview filename.txt.
In the menu trigger I wrote:
declare
kom varchar2(200);
begin
kom:='tview file.txt';
host(kom, screen);
end;
It works but only , when tview.exe is on C: drive and text file names just "file". If I change the directory for example C:\new\tview file.txt , or change file name ( C: tview new.txt) I have problems with tview application?
It is because that application, or it is not possible to call such command in host()?
I want to display file having different name than just "file"!
Please help!
and thanks!!!!
|
|
|
|
Re: How to run the application using "host" command ? [message #168571 is a reply to message #168523] |
Fri, 21 April 2006 00:34 |
Catty
Messages: 64 Registered: April 2006 Location: Poland
|
Member |
|
|
Hello!
Unfortunately, it doesn't work when I have all my Forms files ( execuatbles and others) on, for exmaple, D: and tview.exe application is on C: So , like you wrote , it's not Forms' problem. I have also tried something like this:
kom:='tview *.txt'
but it doesn't work either
I have also wondered , if I call such command:
_________________________________________________________________
kom:='PLUS80W.EXE '
||GET_APPLICATION_PROPERTY(USERNAME)
||'/'||GET_APPLICATION_PROPERTY(PASSWORD)
||'@'||GET_APPLICATION_PROPERTY(CONNECT_STRING)
||'@305.sql '||:plik||' '||:zaklad||' '||:data||' '||:kategoria;
HOST(kom,screen);
_________________________________________________________________
where, in that earlier example , I should put '/'?
I'm thakful for your advice
|
|
|
|
Re: How to run the application using "host" command ? [message #168583 is a reply to message #168574] |
Fri, 21 April 2006 01:18 |
Catty
Messages: 64 Registered: April 2006 Location: Poland
|
Member |
|
|
I don't know what happened ( I can only guess ) but I have changed directory of all my forms and it works But not everything is great I try to describe you my all appliction: Let's start
My application made in Forms 6i is application which generates reports for productive units of my company. Those reports are txt files. User wants to see report from Forms level. I use tview.exe to do that, to make him happy I don't know now , wher user will put all forms files on his PC and in which directory he wants to put his reports.
In the trigger ( when-button-pressed) of form with report option , I put that code:
_________________________________________________________________
:plik:=GET_FILE_NAME('C:\',
'plik.txt',
'Text Files (*.txt)|*.txt|',
'Podaj nazwę pliku',
SAVE_FILE,
TRUE);
_________________________________________________________________
and for that I established target report file. If user change catalog of his report file , I will have to change that trigger and , further , I will also have to change directory of my all forms files. As result , I have problems with relocating of all necessary files
But if I change triggers , all works great
Thank for your help David
|
|
|
|
|
|
|