I have a form which contains a cfselect that allows multiple values to be 
chosen.  When trying to insert all the data from the form into the database I 
get an error on that field saying that there are too many values.  I've tried 
several different methods to insert the data with no luck, including creating a 
list and looping around the insert query, but nothing is working. Any advice?  
Here's what works with 1 mcd selected, but generates the "too many values" 
error when multiple are selected:

>From the form:

<cfform name="form_rtpinfo" method="post" action="rtp.update.cfm" 
onSubmit="return validateIt()" preservedata="yes" >

<cfselect name="mcd" id="mcd" size="4" query="mcds" group="cnty_name" 
display="mcd_name" value="semmcd" selected="#mcd#" queryPosition="below" 
required="yes" multiple="yes" message="You must select at least one location." 
onChange="" style="width:230px;">

>From the action file:

<!--- assign new project an id_number... --->
        <cfquery name="newid">
                SELECT RTP_MASTER_SEQUENCE.NEXTVAL AS TEMPID FROM DUAL
        </cfquery>

<cfquery  name="insert_mcd">
insert into RTP_MCD (RTP_ID, MCD) values (#newid.tempid#, #mcd#)
</cfquery> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4049
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to