keys must be unique. Does <cfdump var="#tmpFieldList#" /> show a
unique list of ids?
Doug
----- Original Message -----
From: Ricardo Russon <[EMAIL PROTECTED]>
Date: Wed, 15 Sep 2004 09:49:55 +1000
Subject: Re: Struct Insert
To: CF-Talk <[EMAIL PROTECTED]>
Ok, now i have the try catch working again. dunno what
happened, but i am using the exact same code.
but that is a very slow process. why can't i use the structInsert ?
Thanks
Ricardo.
Ricardo Russon wrote:
> this is weird, on my dev box this code works
>
> <cfset StructInsert(form, "#tmpFieldList.id#",
> tmpFieldList.defaultvalue, false)>
>
> but on the production box, it tells me :
>
> "Cannot insert item with key 1. This key already exists. "
>
> This happens from time to time, i don't know why, but when it does
> i usually put a <try> <catch> around it.
>
> <cftry>
> <cfset StructFind(form, "#tmpFieldList.id#")>
> <cfcatch type="any">
> <cfset StructInsert(form, "#tmpFieldList.id#",
> tmpFieldList.defaultvalue, false)>
> </cfcatch>
> </cftry>
>
> but it is still giving me the same error. wtf??
>
> I know that cf has troubles with variable names that start with numbers.
> but up
> until a few weeks ago it didn't seem to care to much.
>
> TIA
> Ricardo.
>________________________________
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Struct Insert Ricardo Russon
- Re: Struct Insert Ricardo Russon
- Re: Struct Insert Douglas Knudsen
- Re: Struct Insert Ricardo Russon
- Re: Struct Insert Andrew Grosset
- RE: Struct Insert Pascal Peters