problem with access/cf doubling value

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Hi,

I'm running a query to insert a new record. There are several fields to be inputed. Everything works fine and everything is coded the same. One of the values, however, always gets doubled. Whenever it gets entered into access it always comes up as,

"value1, value1" where as it should just be "value1"

The field right after it is almost the same, but it gets entered as a single value..

anybody know why this might be happening?

 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
If CF receives two variables with the same name in the FORM or URL scope, it will append the values together in a comma delimited list.

For instance, if you submit:

<form action="processForm.cfm">
...<input type="hidden" name="test" value="value1">
...<input type="hidden" name="test" value="value1">
</form>

processForm.cfm will read #FORM.test# as "value1,value1".

Check your input page to make sure that your fieldnames are not repeated.
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
whooo ha. i cant believe i missed that. doubled it was..... the second instance was hidden in a different group of values. how it got there???? .... :)

thanks!
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: TechBoyJK
whooo ha. i cant believe i missed that. doubled it was..... the second instance was hidden in a different group of values. how it got there???? .... :)

thanks!

This is a new "feature" that was added sometime between CF4.5 and CF MX (we skipped CF5). I racked my brain for a few days trying to figure out why some of my queries using URL parameters were now failing after we upgraded to CF MX.