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

Calling procedures inside packages in Oracle from Delphi

158 views
Skip to first unread message

Magnus S. Petersen

unread,
Jan 7, 1998, 3:00:00 AM1/7/98
to

I have recently started with packages in Personal Oracle7.
I am working with Delphi 2 C/S and cannot figure out how to
call the modules inside the packages.
It seem as if i cannot use the component StoredProcedure directly, as the
database package.function/procedure does not appear in the list.
Am i doing something wrong or is it really necessary to use TQUERY component
to call the modules.
Has anyone out there any experience in this ?
Regards
Magnus


Billy Verreynne

unread,
Jan 8, 1998, 3:00:00 AM1/8/98
to

Magnus S. Petersen wrote in message <68um57$2jr$2...@news1.inet.tele.dk>...

>I have recently started with packages in Personal Oracle7.
>I am working with Delphi 2 C/S and cannot figure out how to
>call the modules inside the packages.
>It seem as if i cannot use the component StoredProcedure directly, as the
>database package.function/procedure does not appear in the list.
>Am i doing something wrong or is it really necessary to use TQUERY
component
>to call the modules.


I never use any data controls/classes in Delphi but TQUERY - this gives me
complete control over the SQL statements. Special db classes (databound
controls) like TTABLE and TSTOREDPROC have internal SQL statements for their
methods, which may or may not be the best/optimal for a particular database.
And you only discover which it is (optimal SQL or not) when the app is in
production and you get very irate users because of bad performance. Same
applies to VB programs - we only used snapshots and execsql and stayed away
for the other db objects.

I suggest using TQUERY only. You can also write a little stored proc wrapper
for TQUERY that is Oracle specific/optimised. That's why I love Delphi - if
you want to create a new class it's very easy. :-)

regards,
Billy


mike...@cprailway.com

unread,
Jan 8, 1998, 3:00:00 AM1/8/98
to

In article ,
"Billy Verreynne" wrote:
>
> Magnus S. Petersen wrote in message ...

I have had success using the TSTOREDPROC component. The way to get
Delphi to see the stored procedure is to set up a synonym within Oracle
for the stored procedure.

Mike Hall

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet

Ronald van Woensel

unread,
Jan 18, 1998, 3:00:00 AM1/18/98
to

we've had the same problems and could not call packaged functions using
TStoredProc
We just made wrappers around all those functions, which works fine:

CREATE OR REPLACE PACKAGE xxxx AS
PROCEDURE x2(vcInput IN VARCHAR2) AS
BEGIN
...
END;
END;

CREATE OR REPLACE PROCEDURE w_x2(vcInput IN VARCHAR2) AS
BEGIN
xxxx.x2(vcInput);
END;

This is a reliable workaround.


Billy Verreynne wrote:

> Magnus S. Petersen wrote in message

> <68um57$2jr$2...@news1.inet.tele.dk>...

--
++RVw:R...@InCORE.Xs4ALL.Nl#hTtp://wWW.xS4aLL.NL/~NAil++

Ronald van Woensel

unread,
Jan 18, 1998, 3:00:00 AM1/18/98
to

We have had the same problems with calling procedures/functions inside
packages using TStoredProcedure. We solved this by putting wrappers
around it with normal (non-packaged) functions/procedures, like:

create or replace package body xxxx as
procedure x2

0 new messages