> We have got a table in SQL Server 7. In that table we have two triggers =
> that always keep data in that table consistent upon insertions. Those =
> triggers make sure that records comply with two rules. If an insertion =
> violates a rule, the corresponding trigger raises an exception that =
> effectively rolls back the whole transaction.
> 
> If an insertion goes wrong we would like to know which rule has been =
> violated in order to take a different action based on it.
> 
> Is there a way of doing this?
> 
> Since CF only understands of "Database" exceptions as a whole, it =
> doesn=B4t allow us to distinguish what has gone wrong exactly. Every =
> trigger should respond in a different way we suppose, but... how can =
> that output be processed from CF?
> 
> Francisco Montes
> Spain on Line


Francisco

You may be able to take advantage of the fact that, if you do a SELECT
into a T-SQL variable, inside a TRIGGER, the value of that variable
is available to the page that did the CFQUERY that fired the trigger
(thanks to Paul Hastings for this tip)

I you can't do what you need using that technique, I'd suggest replacing
your triggers with stored procs.

Nick



**********************************************************************
Information in this email is confidential and may be privileged. 
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**********************************************************************
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to