Home » Developer & Programmer » Forms » CLIENT_HOST issue (Forms Version 10.0.2.0.2 , Database 10g Enterprise Edition Release 10.2.0.1.0)
CLIENT_HOST issue [message #341339] Mon, 18 August 2008 07:29 Go to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

I have the following Code in one of the push buttons

CLIENT_HOST('Net Send TestUser "Hello"',no_screen);


How will I know if it has been successfully executed or not?

I tried using

If Not Form_Success then


But it did not work.In 6i I was using Host command and it was working fine.I tried it in 10g but it always shows successfull.

Tested :

I tried sending a net send command to a user who is not logged on the network,It just stops at the client host command.I also put a message after the client host , but its not going past the client_host.

Re: CLIENT_HOST issue [message #341451 is a reply to message #341339] Mon, 18 August 2008 21:13 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use the 'user_exit' command.

David
Re: CLIENT_HOST issue [message #341452 is a reply to message #341451] Mon, 18 August 2008 21:16 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Sorry, missed the 'client' bit.

Place your code into a script and call it. Inside that script either write to the database or create a file. Then, when back in the form test the database or existance of the file.

David
Re: CLIENT_HOST issue [message #341505 is a reply to message #341452] Tue, 19 August 2008 02:26 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Hi David,

With what I understood from your message I should create script file like a .bat file and in that file write the command for net send and then a command to create a temp file in the same folder. then from forms i should check for the existance of that temp file. right?

If I need to pass parameters to the net send command like

Declare
  var varchar2(100);
Begin
  var:= 'Net Send '||:block1.user1||' "Hello "';
  CLIENT_HOST(var,no_screen);
End;


How in the above case will i write the script file?
Re: CLIENT_HOST issue [message #341510 is a reply to message #341505] Tue, 19 August 2008 02:48 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Can't you write the parameters to file and pipe that file into the script that you write?

David

Sorry. Typo.

[Updated on: Tue, 19 August 2008 02:49]

Report message to a moderator

Re: CLIENT_HOST issue [message #341512 is a reply to message #341510] Tue, 19 August 2008 02:57 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member


Quote:
Can't you write the parameters to file and pipe that file into the script that you write?


How to do that? can you suggest some links i can find out how i could do it?
Re: CLIENT_HOST issue [message #341579 is a reply to message #341512] Tue, 19 August 2008 07:10 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Allright..for everyone who has read this topic, I have found a solution to my problem.

I created a function

FUNCTION My_Host_Cmd(VAL varchar2)
RETURN BOOLEAN IS
BEGIN
   client_host(val);
   return TRUE;

EXCEPTION 
WHEN OTHERS THEN
   return FALSE;

END;


In place of the below code

var := 'cmd /c NET SEND '||:BLOCK1.USER_NAME||' " '||:BLOCK1.MESSAGE_SENT||' "';
CLIENT_HOST(var);
If Not Form_Success then

I am using

var := 'cmd /c NET SEND '||:BLOCK1.USER_NAME||' " '||:BLOCK1.MESSAGE_SENT||' "';
IF not My_Host_Cmd(var) then 


This solves the problem.
Re: CLIENT_HOST issue [message #343474 is a reply to message #341579] Wed, 27 August 2008 06:49 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Hi David,

I am getting the below error msg if i try to send the net send message to a user who is not logged on the network.

I tried searching everywhere, Raised a TAR with Oracle also, still nothing... anyone have an idea?
  • Attachment: 3.JPG
    (Size: 59.76KB, Downloaded 1529 times)
Re: CLIENT_HOST issue [message #344741 is a reply to message #343474] Mon, 01 September 2008 02:43 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Any Help would be appreciated.
Re: CLIENT_HOST issue [message #344921 is a reply to message #344741] Mon, 01 September 2008 21:22 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I have no idea. Please confirm that you have used 'message;pause' pairs to prove that this is the line that is failing. The way I see it is that the 'NET' command is returning an error code or doing something else in terms of the browser window. For me, this is a MS problem. Have you tried running the 'NET' command via a batch file and see what happens, or via a Java script and see what happens?

David
Re: CLIENT_HOST issue [message #345026 is a reply to message #344921] Tue, 02 September 2008 03:02 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Thanks David for your reply. I have solved the problem. The problem was in the webutil.pll file. I do not know what it was, but i just detached the pll file ,moved it to another location and recompiled it and again attached it back to the form. It worked .... No explanation.

Mudabbir
Re: CLIENT_HOST issue [message #626007 is a reply to message #345026] Sun, 19 October 2014 01:37 Go to previous message
m_golam_hossain
Messages: 89
Registered: August 2008
Location: Uttara, Dhaka, Bangladesh
Member

Thank you very much, Dear Mr. Mudabbir,

I also had the problem and have been benefited from your solution.
Previous Topic: Converted Stand Alone Oracle Forms executable
Next Topic: when-validate-item Issue
Goto Forum:
  


Current Time: Thu Dec 12 23:35:31 CST 2024