Home » Developer & Programmer » Forms » using host command (merged)
using host command (merged) [message #142184] Thu, 13 October 2005 13:00 Go to next message
dmack
Messages: 42
Registered: March 2005
Location: TNT
Member
I have successfully used host command to move a file from one destination to another. however there is a condtion:

host(dept_script)

IF NOT Form_Success THEN
Update table
set feild name to = 'N'

ELSE set field name = 'Y'

END IF;

the command works perfectly but the update does not.

Any ideas to the cause.
Thank You.
using host command [message #142185 is a reply to message #142184] Thu, 13 October 2005 13:01 Go to previous messageGo to next message
dmack
Messages: 42
Registered: March 2005
Location: TNT
Member
I have successfully used host command to move a file from one destination to another. however there is a condtion:

host(dept_script)

IF NOT Form_Success THEN
Update table
set feild name to = 'N'

ELSE set field name = 'Y'

END IF;

the command works perfectly but the update does not.

Any ideas to the cause.
Thank You.
using host command [message #142187 is a reply to message #142184] Thu, 13 October 2005 13:03 Go to previous messageGo to next message
dmack
Messages: 42
Registered: March 2005
Location: TNT
Member
I have successfully used host command to move a file from one destination to another. however there is a condtion:

host(dept_script)

IF NOT Form_Success THEN
Update table
set feild name to = 'N'

ELSE set field name = 'Y'

END IF;

the command works perfectly but the update does not.

Any ideas to the cause.
Thank You.
Re: using host command [message #142226 is a reply to message #142187] Thu, 13 October 2005 18:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Your form does not SEE the 'update' as a 'change'. Therefore when you 'exit' the form it does not do a 'commit'. Consider either 'banging' a form-based database field to itself to 'make a change' in the form which, in turn, the form will 'see' when you exit therefore offering you the 'save changes' message or put a standard.commit after your 'update' command.

David
Re: using host command [message #142777 is a reply to message #142226] Mon, 17 October 2005 12:32 Go to previous messageGo to next message
dmack
Messages: 42
Registered: March 2005
Location: TNT
Member
Hi,

The standard.commit worked. However,if the process is not successful the table is still updated as Y any reasons. I am thinking the update is dependent on form success and not the actual success of the process i.e the script.

Any thoughts on why this must be and what I can do to correct this
Re: using host command [message #142811 is a reply to message #142777] Mon, 17 October 2005 18:09 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Does your script raise an error when it fails? The script HAS to set something to indicate a failure, I don't remember what it is as I never use operating system functionality, only SQL*Plus facilities. But I think its 'rc' or 'return_code' or something like that depending upon in which language you wrote the script.

David
Previous Topic: Best way to record AUDIT - Forms or DB Trgr ?
Next Topic: selecting command lines(c:\ etc ) on runtime
Goto Forum:
  


Current Time: Fri Sep 20 03:39:39 CDT 2024