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]

Reply via email to