إنتقال للمحتوى

  • تسجيل الدخول عبر الفيس بوك تسجيل الدخول عبر تويتر Log In with LinkedIn Log In with Google      تسجيل دخول    
  • إنشاء حساب

صورة
- - - - -

calling exe file from procedure


2 رد (ردود) على هذا الموضوع

#1 mo_sa_tanany

mo_sa_tanany

    عضو

  • الأعضــاء
  • 10 مشاركة

تاريخ المشاركة 22 May 2005 - 10:27 AM

hiii all
can any one help me
i want to call exe from the database trigger or a procedure
thanks

#2 the_oracle_dev

the_oracle_dev

    عضو نشط

  • الأعضــاء
  • 222 مشاركة

تاريخ المشاركة 22 May 2005 - 03:14 PM

HOST built-in

Description

Executes an indicated operating system command.

Syntax



PROCEDURE HOST
(system_command_string VARCHAR2);
PROCEDURE HOST
(system_command_string VARCHAR2,
screen_action NUMBER);




Built-in Type unrestricted procedure
Enter Query Mode yes

Parameters

system_command_ string

Specifies the system command you want to pass to your particular operating system.

screen_action

Specifies one of the following constants:

No parameter: Specifies that Form Builder will:
*- clear the screen
*- prompt the operator to return from the command

NO_PROMPT: Specifies that Form Builder will:
*- clear the screen (does not prompt the operator to return from the command)

NO_SCREEN Specifies that Form Builder will:
*- not clear the screen
*- not prompt the operator to return from the system command


The HOST command should not send output to the screen when using the NO_SCREEN parameter.

Usage notes

Thescreen_action parameter is only relevant to applications running in character mode, where the output of the Host command is displayed in the same window as the form. In GUI applications, the output of the Host command is displayed in a separate window.

On Microsoft Windows NT, when using HOST to execute a 16-bit application, the FORM_SUCCESS built-in will return TRUE whether the application succeeds or fails. This is a Microsoft a Win32 issue. 32-bit applications and OS commands will correctly return TRUE if executed sucessfully and FALSE if failed. Invalid commands will return FALSE.

On Windows 95 platforms the FORM_SUCCESS built-in will always return TRUE for HOST commands which fail. This includes calls to command.com or OS functions, any 16-bit DOS or GUI application, or an invalid command. 32-bit applications will correctly return TRUE if executed sucessfully and FALSE if failed.

Examples



/*   
** built-in: HOST
** Example: Execute an operating system command in a
** subprocess or subshell. Uses the
** 'Get_Connect_Info' procedure from the ** GET_APPLICATION_PROPERTY example.
*/
PROCEDURE Mail_Warning( send_to VARCHAR2) IS
the_username VARCHAR2(40);
the_password VARCHAR2(40);
the_connect VARCHAR2(40);
the_command VARCHAR2(2000);
BEGIN /*
** Get Username, Password, Connect information
*/
Get_Connect_Info(the_username,the_password,the_connect);
/*
** Concatenate together the static text and values of
** local variables to prepare the operating system command
** string.
*/
the_command := 'orasend '||
' to='||send_to||
' std_warn.txt '||
' subject="## LATE PAYMENT ##"'||
' user='||the_username||
' password='||the_password||
' connect='||the_connect;

Message('Sending Message...', NO_ACKNOWLEDGE);
Synchronize;
/*
** Execute the command string as an O/S command The
** NO_SCREEN option tells forms not to clear the screen
** while we do our work at the O/S level "silently".
*/
Host( the_command, NO_SCREEN );
/*
** Check whether the command succeeded or not
*/
IF NOT Form_Success THEN
Message('Error -- Message not sent.');
ELSE
Message('Message Sent.');
END IF;
END;



-*-*-*-*-*-*-*
إني احبكم في الله
بسم الله الرحمن الرحيم

قل لو كان البحر مداداً لكلمات ربي لنفد البحر قبل ان تنفذ كلمات ربي ولو جئنا بمثله مددا

صدق الله العظيم

#3 mo_sa_tanany

mo_sa_tanany

    عضو

  • الأعضــاء
  • 10 مشاركة

تاريخ المشاركة 23 April 2007 - 02:11 PM

many thanks 4 your answer
but my question was
how can i call exe
from
DATABASE trigger
or
Database proc

not from the forms

thanks