Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PL/SQL call .exe program?

577 views
Skip to first unread message

Jimmy

unread,
Mar 9, 1999, 3:00:00 AM3/9/99
to
Hello all,
Is it possible to call a .exe program within Oracle PL/SQL? The .exe
program is in VB or C program. And how to communicate with the .exe
program with the parameters (both IN/OUT)?

Thanks,
Jimmy

Hans Berger

unread,
Mar 10, 1999, 3:00:00 AM3/10/99
to

Jimmy schrieb in Nachricht <36E623...@comp.polyu.edu.hk>...

You can only Call a external Procedure oder Function from a Dynamic Link
Library DLL.
This DLL can have modal Forms, so than a .exe-Program

Bye
Hans

Christopher M. Day

unread,
Mar 10, 1999, 3:00:00 AM3/10/99
to
Jimmy,

This is possible with V7 using DBMS_PIPE and with V8 using EXTPROC.

Chris.

Mladen Gogala

unread,
Mar 11, 1999, 3:00:00 AM3/11/99
to
In article <36E623...@comp.polyu.edu.hk>,

Jimmy <c663...@comp.polyu.edu.hk> wrote:
> Hello all,
> Is it possible to call a .exe program within Oracle PL/SQL? The .exe
> program is in VB or C program. And how to communicate with the .exe
> program with the parameters (both IN/OUT)?
>
> Thanks,
> Jimmy
>
No, Oracle cannot call EXE executables, it can call routines written in C
(not C++ - name mangling!!!!) from a DLL. Oracle can call EXE files - on
OpenVMS, though.
Mladen Gogala

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Wicksey

unread,
Mar 11, 1999, 3:00:00 AM3/11/99
to
Is it not possible to call the exe file using the host statement, and pass
the input values in as parameters of the call? I'm not sure I know exactly
what you want to do. If the program is already in C, then precompile it in
Pro*C to a dll and call the functions using ORA_FFI.

HTH

Wicksey
Jimmy <c663...@comp.polyu.edu.hk> wrote in article
<36E623...@comp.polyu.edu.hk>...

Arnold Schommer

unread,
Mar 11, 1999, 3:00:00 AM3/11/99
to
Mladen Gogala wrote:
>
> In article <36E623...@comp.polyu.edu.hk>,
> Jimmy <c663...@comp.polyu.edu.hk> wrote:
> > Hello all,
> > Is it possible to call a .exe program within Oracle PL/SQL? The .exe
> > program is in VB or C program. And how to communicate with the .exe
> > program with the parameters (both IN/OUT)?
> >
> > Thanks,
> > Jimmy
> >
> No, Oracle cannot call EXE executables, it can call routines written in C
> (not C++ - name mangling!!!!) from a DLL. Oracle can call EXE files - on
> OpenVMS, though.
> Mladen Gogala
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

As far as i know, this is wrong: using the built-in host() you may call
any program. The communication is not directly supported, but should be
at least possible somehow using files.

hope it helps

Arnold Schommer

Mladen Gogala

unread,
Mar 11, 1999, 3:00:00 AM3/11/99
to
In article <36E7F265...@fs-edv.de>,
The 'host' function is implemented in sqlplus, not in PL/SQL. You cannot
write something like:

create or replace procedure(mydrive in varchar2) as
begin
host('format '||'mydrive');
end;

because PL/SQL will give you an error, saying that procedure HOST should
be declared. The only way to do that is to write it in C and link to
oracle via external prodedures interface.

Manmohan Mann

unread,
Mar 14, 1999, 3:00:00 AM3/14/99
to Mladen Gogala
Hi,

In the environment that our system is in (Oracle 7.1.6, Forms 3.0 on
VM/CMS), we use the host command frequently inside Forms to call
external programs. I am relatively new to this environment, so I am not
sure how it happens, but I do know that "parameters" are passed using
files.

Can somebody explain. Has to do with the fact that these aren't stored
procedures (in the database)?

Thanks,

Marcus N Hofer

unread,
Mar 19, 1999, 3:00:00 AM3/19/99
to

Manmohan Mann schrieb in Nachricht <36EB2A93...@hotmail.com>...

>Hi,
>
>In the environment that our system is in (Oracle 7.1.6, Forms 3.0 on
>VM/CMS), we use the host command frequently inside Forms to call
>external programs. I am relatively new to this environment, so I am not
>sure how it happens, but I do know that "parameters" are passed using
>files.
>
>Can somebody explain. Has to do with the fact that these aren't stored
>procedures (in the database)?


Yes.
PL/SQL is the procedural programming environment of the database server.
forms and SQL PLus both are client tools, where You have a 'host' built in
to call apps on Your clients, with no parameters passed back. if You want to
call externals from PL/SQL You have to use 'EXTERNAL_PROCEDURE' and
dlls as mladen described.

regards,
--marcus

0 new messages