Home » Developer & Programmer » Forms » How to run the application using "host" command ?
icon5.gif  How to run the application using "host" command ? [message #168393] Thu, 20 April 2006 03:36 Go to next message
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 #168523 is a reply to message #168393] Thu, 20 April 2006 19:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If the executable and data files are in other directories and you are at the C: prompt, does your command work? If not then it isn't a Forms problem. If it does, then use that command EXACTLY as your host command.

I think you need at least one more '\' in your command.

David

[Updated on: Thu, 20 April 2006 19:55]

Report message to a moderator

Re: How to run the application using "host" command ? [message #168571 is a reply to message #168523] Fri, 21 April 2006 00:34 Go to previous messageGo to next message
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: Sad 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 Sad
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 Smile
Re: How to run the application using "host" command ? [message #168574 is a reply to message #168571] Fri, 21 April 2006 00:45 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Most people don't like "( C: tview new.txt)", they perfer "( C:\tview new.txt)".

Okay, let's say 'tview' is in 'C:\new', that the data file 'new.txt' is in 'C:\tmp', and that you are currently at the 'C:\' prompt. Does the command "C:\new\tview C:\tmp\new.txt" work or not?

David
Re: How to run the application using "host" command ? [message #168583 is a reply to message #168574] Fri, 21 April 2006 01:18 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
I don't know what happened ( I can only guess Smile) but I have changed directory of all my forms and it works Smile But not everything is great Smile I try to describe you my all appliction: Let's start Smile

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 Smile 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 Sad 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 Sad
But if I change triggers , all works great Smile
Thank for your help David Smile
Re: How to run the application using "host" command ? [message #168585 is a reply to message #168583] Fri, 21 April 2006 01:27 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you considered using the d2kwutil add-on?

David
Re: How to run the application using "host" command ? [message #168587 is a reply to message #168585] Fri, 21 April 2006 01:36 Go to previous messageGo to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
No I didn't.
Frankly speaking, I know not enough about d2kwuti Sad
Re: How to run the application using "host" command ? [message #168592 is a reply to message #168587] Fri, 21 April 2006 01:44 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
It has an 'open file' windows thingy through which your user would be able to point to any file that they can see and you just pick up the details and use them to build your host command.

David
Re: How to run the application using "host" command ? [message #168597 is a reply to message #168592] Fri, 21 April 2006 02:02 Go to previous message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
OK! David thank you very much. My application works , but now I will try to improve it by using the d2kwutil add-on. If I will have more questions I write on forum . Thank you once again Smile
Previous Topic: creating setup of d2k projects
Next Topic: displaying the details of a particular employee
Goto Forum:
  


Current Time: Fri Sep 20 07:32:55 CDT 2024