Board index » delphi » Oracle 7.3 Packages using TStoredProc

Oracle 7.3 Packages using TStoredProc

hi,

anyone know how to access a packaged procedure using a TStoredProc ??
I'm using Oracle 7.3.x and Delphi 3.0

example...

***********
Server Side
***********

/* PACKAGE INTERFACE */

create or replace package FooPackage as
   procedure FooProc(aValue in number);
end FooPackage;

/* PACKAGE IMPLEMENTATION */

create or replace package body FooPackage as

procedure FooProc(aValue in number) is
begin
    insert into FooTable values (aValue);
exception
  when others then raise;
end FooProc;

end FooPackage;

***********
Client Side
***********

in some event...

with spFooProc do begin
  Prepare;
  ParamByName('aValue').Value := 100;
  ExecProc;
end;

any ideas other than creating a non packaged procedure ??

thanx in advance

JB

 

Re:Oracle 7.3 Packages using TStoredProc


In StoredProcName property use:
FOOPACKAGE.FOOPROC

    jonathan.black escreveu na mensagem <36CF0FBF.83E32...@{*word*269}.net>...
    hi,
    anyone know how to access a packaged procedure using a TStoredProc ??
    I'm using Oracle 7.3.x and Delphi 3.0

    example...

    ***********
    Server Side
    ***********

    /* PACKAGE INTERFACE */

    create or replace package FooPackage as
       procedure FooProc(aValue in number);
    end FooPackage;

    /* PACKAGE IMPLEMENTATION */

    create or replace package body FooPackage as

    procedure FooProc(aValue in number) is
    begin
        insert into FooTable values (aValue);
    exception
      when others then raise;
    end FooProc;

    end FooPackage;

    ***********
    Client Side
    ***********

    in some event...

    with spFooProc do begin
      Prepare;
      ParamByName('aValue').Value := 100;
      ExecProc;
    end;

    any ideas other than creating a non packaged procedure ??

    thanx in advance

    JB

Other Threads