Curiously, numeric does not work. I thought I had tried that but I just
tried it again and no dice. Keeping the returntype as query and using
<cfset lastId = GetLastId().Expr1>
does work and presumably/hopefully will work for the other multiselects
which are essentially the same thing.
I did realize that the complex to simple thing was a query problem but
the cfdump giving me the correct value threw me off. Dominic's note
regarding cfdump is extremely useful; had I known that it'll
automagically do the convert I would have looked further into the
getLastID function...
Thank you.
Greg Morphis wrote:
> ahhhh
>
> returntype="query">
>
> you should change that to returntype="numeric"
> and return qLast.Expr1
>
> That should solve it.. qLast is a complex value (the query)
>
>
> On Tue, Mar 18, 2008 at 1:01 PM, pauld581 <[EMAIL PROTECTED]> wrote:
>
>> I have this:
>> <cfset lastID="#getLastID()#">
>>
>> inside of the function immediately before the loop and indeed a cfdump
>> returns the correct/expected value. I have also tried "<cfset VAR...>
>>
>>
>>
>>
>> Greg Morphis wrote:
>> > Is this inside a cffunction? If not change
>> > <cfset var lastID="#getLastID()#">
>> > to
>> > <cfset lastID="#getLastID()#">
>> >
>> > and can you post the code for getLastID() ??
>> >
>> > It might be there..
>> >
>> >
>> > Thanks
>> >
>> > On Tue, Mar 18, 2008 at 12:34 PM, pauld581 <[EMAIL PROTECTED]> wrote:
>> >
>> >> Okay..this is interesting. The statement (and a couple punctuation
>> >> variations with/without quotes/semicolon, etc):
>> >>
>> >> <cfoutput>insert into Student_Status (Student_ID,Status_ID)
>> >> values(#lastID#,#i#);</cfoutput>
>> >>
>> >> outputs this: insert into Student_Status (Student_ID,Status_ID) values(
>> >> and stops there with this error:
>> >>
>> >>
>> >> Complex object types cannot be converted to simple values.
>> >>
>> >> The cfdumps are still correct. The insert statement with values(117,2)
>> >> works in Access.
>> >>
>> >> Any ideas on what is happening with those vars?
>> >>
>> >> Paul
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Greg Morphis wrote:
>> >> > Paul..
>> >> > try this...
>> >> > wrap the query in <cfoutput>'s like
>> >> > <cfoutput>
>> >> > insert into Student_Status (Student_ID,Status_ID)
>> >> > values ("#lastID#", "#i#")
>> >> > </cfoutput>
>> >> >
>> >> > Take the output and run it in Access and see if you get the same error
>> >> > message..
>> >> >
>> >> >
>> >> > O
>> >>
>> >>
>> >>
>> >>
>> >> > n Tue, Mar 18, 2008 at 12:03 PM, Greg Morphis <[EMAIL PROTECTED]>
>> wrote:
>> >> >
>> >> >> Also considering you said "I have also tried not using the
>> >> >>
>> >> >> CFqueryparam thing at all but that
>> >> >> doesn't work"
>> >> >> I don't think it's a cast issue... I think it's something else
>> >> >>
>> >> >>
>> >> >> On Tue, Mar 18, 2008 at 11:54 AM, Dominic Watson
>> >> >> <[EMAIL PROTECTED]> wrote:
>> >> >> > Hi Paul, what error message are you seeing?
>> >> >> >
>> >> >> > Dominic
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Blog it up: http://fusion.dominicwatson.co.uk
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301532
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4