Paul,

> triggers do have their place in development toolboxes.

Sure, I never said otherwise. Triggers are great.
I've built systems that rely completely on them.

> > But what is the query that queryName refers to?
> 
> the cfquery for the original insert.
> 
> > Are you saying that CF is clever enough to pick up the fact
> > that the trigger has fired & grab the value from somewhere?
> 
> no, but ODBC & sql server are...

So let me get this straight, if you have a trigger in
your database like this:

CREATE TRIGGER table1_insert
ON table1
FOR INSERT
AS
SELECT table1_ID FROM INSERTED
</CFQUERY>

and have a .CFM containing this:

<CFQUERY name="insertRow"...>
INSERT into table1 (col2) VALUES (#value2#)
</CFQUERY>

then you can refer to #insertRow.table1_ID# and it will
contain the ID that was inserted for you by SQL Server,
despite no such variable/column being mentioned in the
<CFQUERY>, because the SQL Server ODBC driver returns the
trigger variable in response to the INSERT statement
and CF puts that in the <CFQUERY> results accordingly?

If so... cool!

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/cf-talk@houseoffusion.com/
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