I just ran into this and while it's new to me, I'm sure it's old news
to others here. I'm looking at someones code from CF 7 where they have
a cfquery inserting a record. The cfquery tag only has a name and a
datasource. Immediately after the tag, there is a cfset that makes use
of the query's name and the name of the identity field of the table
that the data was inserted into.

<cfquery name="testquery" datasource="test">
insert ...
</cfquery>
<cfset newid = testquery.identityfield>

In CF 7, the newid would be the id of the newly inserted record. In CF
9 all I get is an error. If I use a result attribute rather than a
name attribute, I get a structure with the identity result buried in
it.

So here's the question. If it worked in 7 and not in 9, is there a
simple fix to make it work like it did in 7 again? I'd rather not have
to recode a whole slew of insert statements.

Thanks

--
Michael

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330190
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