× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



jt wrote:

> Is there much difference between, and any advantage
> to, stored procedures vs.triggers???

A stored procedure is a program called explicitly by an SQL statement.
A trigger is a program called implictly by a database touch.
They don't really overlap much, so I'm not certain on what basis I'd be able
to compare them.

The stored procedure can be written in RPG, which is one of the exquisite
beauties of OS400.  Simply write the program the way you normally would,
then 'register' it with SQL via CREATE PROCEDURE.  Very nice compared to
other databases.

The trigger can be written in RPG, which is another plus for OS400.
Basically, the trigger acts like an exit program that you register with the
database via ADDPFTRG.  When a database touch occurs, DB2 passes the buffer
to your trigger and you can do what you want with it, including reject the
touch.  Being able to do this in an HLL is very nice compared to other
databases.

> And, iirc, I saw a post on this list to the
> effect that triggers were a technique that
> "is no longer in favor", but I don't know why
> it wouldn't be.

I don't recall that post.
  --buck




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.