It seems to die on the first loop because nothing gets inserted. Cfdump shows the proper form variables being passed.
<cfloop index = "LoopCount" from="1" to="#form.num_genes#" step="1"> <cfquery datasource="#application.datasource#" name="AddProject" username="#request.dsn_username#" password="#request.dsn_password#" > Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count) Values( '#thisprojectid#', '#form["ProteinSequence" & LoopCount]#', '#form["genename" & LoopCount]#', '#form["NoAminoAcids" & LoopCount]#' ) </cfquery> </cfloop> On 10/26/2010 10:51 AM, Michael Grant wrote: > Could you post your code? > If you only loop a single time do you still get the error? > > On Tue, Oct 26, 2010 at 1:47 PM, Rick Colman<rcol...@cox.net> wrote: > >> that did not work. >> >> what is funny is that the debug sql statement looks ok : >> >> Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count) >> Values( '20', 'sdalifsdaifasifsadi', 'g1', '15' ) >> >> On 10/26/2010 10:40 AM, Michael Grant wrote: >>> Maybe try this instead: >>> >>> Values( >>> '#thisprojectid#', >>> '#form["ProteinSequence"& LoopCount]#', >>> '#form["genename"& LoopCount]#', >>> '#form["NoAminoAcids"& LoopCount]#' >>> ) >>> >>> >>> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338558 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm