Just out of curiosity Sean, do you know if the value is lazy loaded,
or do you have to pay the cost of retrieving the value on every query
(or at least introspecting to determine whether a value is available)
regardless?  I know you're closest to Railo, but I'm interested in
both (all three?) platforms if you've got the info.

cheers,
barneyb

On Wed, Sep 30, 2009 at 10:19 PM, Sean Corfield <seancorfi...@gmail.com> wrote:
>
> On Tue, Sep 29, 2009 at 12:22 PM, Azadi Saryev <az...@sabai-dee.com> wrote:
>> if you are on CF8, use RESULT attribute of <cfquery> tag and then get
>> GENERATED_KEY from that result:
>> <cfquery name="myquery" datasource="..." result="qResult">
>> INSERT ...
>> </cfquery>
>> <cfset newID = qResult.GENERATED_KEY>
>
> As an aside, the generated key is placed into a different element of
> the result struct for each different database in CF8 (why??!?!) but
> that is fixed in CF9 which also adds GENERATEDKEY for *all* DB types
> so you can write portable code (assuming you stick to standard SQL of
> course and not TSQL - sorry Robert, couldn't resist! :)
>
> Railo recently implemented this same feature (both adding the various
> DB-specific generated key elements as well as the generic GENERATEDKEY
> element). I don't know whether Open BlueDragon supports this feature
> yet. Anyone?
> --
> Sean A Corfield -- (904) 302-SEAN
> Railo Technologies US -- http://getrailo.com/
> An Architect's View -- http://corfield.org/
-- 
Barney Boisvert
bboisv...@gmail.com
http://www.barneyb.com/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:326791
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