Question : My SQL queries take ages to cancel.

My SQL queries take ages to cancel.

What could be the problem?

Answer : My SQL queries take ages to cancel.

I wouldn't attempt to combine both triggers and the use of a data layer such as nhibernate - you're always going to get synchronisation problems. nHibernate is intended to manage your data - and your business layer should manage processes such as updating your prices. Personally I don't go near triggers for any business logic - for auditing perhaps, but nothing else. I think they obscure business logic and make it nigh on impossible to implement other code solutions for managing the data - as you are finding.
Why not move your trigger code into a stored procedure and call the procedure from within the transaction scope of the update if the 'finished' flag is true? I would manage this within the business layer, but you could move this to the data layer if you wish.

Tim
Random Solutions  
 
programming4us programming4us