Board index » delphi » Stored Functions and Stored Procedures

Stored Functions and Stored Procedures

I looked in a few Dephi Database Programming Sources to find out when I
should use Stored Procedures, Triggers and Stored Functions. There is plenty
of information on Stored Procedures and Triggers and why developers should
use one or another, but I could not find any information on when should I
use stored functions. I have an oracle database that has a few stored
functions. Should I rewrite them and make them stored procedures instead in
order to use, for example TStoredProc Delphi component to call them when it
is needed?

Alex

 

Re:Stored Functions and Stored Procedures


I don't believe so, if I remember my Oracle correctly,(it's been a few
years, so don't take any miss-speaking on my part too harshly please), the
great thing about stored functions were they could be included inline in a
query. eg
select a,b,myfunc(c),d from mytable
Now if your usage isn't like this, you might want to do a rewrite, but if
it's doing what you want, why bother?
Mike

Quote
Alex Terekhov <aterek...@psc.gov> wrote in message

news:8896a0$hua19@bornews.borland.com...
Quote
> Should I rewrite them and make them stored procedures instead in
> order to use, for example TStoredProc Delphi component to call them when
it
> is needed?

Re:Stored Functions and Stored Procedures


Those "stored functions" are functions that you can use in your SQL code
to manipulate data that is returned to you as a result set, an output
parameter or data internal to a trigger or stored procedure.
Quote
Alex Terekhov wrote:

> I looked in a few Dephi Database Programming Sources to find out when I
> should use Stored Procedures, Triggers and Stored Functions. There is plenty
> of information on Stored Procedures and Triggers and why developers should
> use one or another, but I could not find any information on when should I
> use stored functions. I have an oracle database that has a few stored
> functions. Should I rewrite them and make them stored procedures instead in
> order to use, for example TStoredProc Delphi component to call them when it
> is needed?

> Alex

Other Threads