> I think what Neil is trying to say is that a Trigger would
> be unnecessary if the resulting events that need to be
> executed were programmed in the original SP.  I tend to
> agree with Neil....somewhat....I wouldn't say Triggers are
> useless, but it seems to me that if proper planning and
> design are in place, when you want a certain event to
> occur when something else happens that you would program
> it intentionally with the original event.

I can think of at least one instance in which a well-designed
application may still not have antiscipated the need for a specific
database action: plugin applications. A plugin application which adds
functionality to a larger pre-existing application may add tables
which then need to be handled. The plugin however should of course not
overwrite any stored procedures or cfquery tags, so... although there
are other ways to handle this of course, a trigger is one way that the
plugin can be certain that these tables are managed when necessary,
even if the larger core application into which the plugin is installed
has been modified in such a way that additional points of entry to the
affected code exist (which could likely be omitted by a lot of other
methods).

> Here's a question on the subject, as I'm not an expert in
> SQL triggers and SP's by any means....if you execute an SP
> from CFQUERY does the connection to the database from CF
> release immediately, even while the SP continues running,
> or does CF stay connected?  If CF stays connected for the
> entire time an SP is running, then THAT would definitely
> give a very good reason to use triggers....You set up your
> primary event in your SP, execute it from CF, and then CF
> can continue processing doing whatever it needs to do
> while the trigger takes over.

Yes and no... My experience with SQL Server (and I suspect other db's)
is that CF stays connected yes -- however -- the stored procedure
doesn't return until all the triggers are done firing either... so...
using the trigger doesn't quite let the code "fire and forget" either.


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215621
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to