> I have a question. I have a application where on one template 
> I have several inserts into one datasource are wrapped inside 
> a cftransaction.  At the end of the loop, but outside the 
> cftransaction, I have an update of a record in a second 
> datasource, marking it as viewed.  My question, is can I have 
> the update query inside my transaction even though it is a 
> separate DSN?

You can, but it won't be treated as part of that transaction. That is, it'll
run, but it won't depend on other queries to succeed, or cause other queries
to be rolled back if it fails.

If you want to have transactions across multiple datasources that point to
the same database server, that can be pretty easy to set up, as long as one
of the datasources uses an account with rights to the database used by the
other datasource. If they point to separate database servers, you need a
distributed transaction coordinator of some sort, which is usually not easy
to set up.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270392
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to