actually, two are int, so revised, but still did not work:
Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'ProteinSequence'. The error occurred in*C:\inetpub\wwwroot\sttr2\orders\neworder_main_confirm_action.cfm: line 77* 75 : '#form['ProteinSequence'& LoopCount]#', 76 : '#form['genename'& LoopCount]#', *77 : #form['NoAminoAcids'& LoopCount]#* 78 : ) 79 :</cfquery> ------------------------------------------------------------------------ VENDORERRORCODE 208 SQLSTATE 42S02 SQL Insert into ProteinSequence (Project_ID, AA_Sequence, Gene_Name, Count) Values( 22, 'sdalifsdaifasifsadi', 'g1', 15 ) DATASOURCE sttr2 code: <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> cfdump: PROTEINSEQUENCE1 sdalifsdaifasifsadi PROTEINSEQUENCE2 sdafklfsaklfsdklaf On 10/26/2010 11:00 AM, Michael Grant wrote: > And Project_ID, AA_Sequence, Gene_Name and Count are all string fields? > > > On Tue, Oct 26, 2010 at 1:58 PM, Rick Colman<rcol...@cox.net> wrote: > >> 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:338561 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm