Sometimes CF acts funny in loops; I see this behavior in other things, neve been able to figure out what causes it but have a workaround when I see it.. The way I fix it is to set each var in the top of the loop and THEN use that new var where I need it within the loop.
For example <cfloop query="one"> <cfset column1val=one.col1> <cfset column2val=one.col2> <cfprocparam type="in" value="#column1val#" dbvarname="bcmid" cfsqltype="cf_sql_varchar"> <cfprocparam type="in" value="#column2val#" dbvarname="rectype" cfsqltype="cf_sql_integer"> </cfloop> Also I noticed you are doing a loop on the query and then embedding a cfoutput. Might try just a cfoutput of the query <cfoutput query="one"></cfoutput> M On Nov 30, 3:53 pm, [EMAIL PROTECTED] wrote: > I have a dilemma. > > I thought I could use this syntax: <cfloop query="getrecord"> to loop > through the oracle query in a sp, but the loop doesn't seem to be > iterating... however, when I do a cfdump of getrecord it properly shows > me all ten records in the query result set. > > The cfloop iterates ten times (reflecting the correct number of > records in the result set) and the RecordCount returns 10, but i'm > only seeing the value of the first record repeated ten times. > > <cfstoredproc datasource="#request.dsn#" procedure="#request.proc#" > blockfactor="50"> > <cfprocparam type="in" value="#spp_BCM_ID#" dbvarname="bcmid" > cfsqltype="cf_sql_varchar"> > <cfprocparam type="in" value="#spp_rec_type#" dbvarname="rectype" > cfsqltype="cf_sql_integer"> > <cfprocparam type="in" value="#spp_fy#" dbvarname="fy" > cfsqltype="cf_sql_integer"> > <cfprocresult name="getrecord"/> > </cfstoredproc> > > <!-- This shows all records correctly in the result set --> > <cfdump var="#getrecord#"> > > <!-- This loops RecordCount times, but keeps showing only the values > from the first record --> > <cfloop query="getrecord"> > <cfoutput>#getrecord.REC_IDX# > </cfloop> > > Anyone got any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list. To unsubscribe, send email to [EMAIL PROTECTED] For more options, visit http://groups.google.com/group/houcfug?hl=en -~----------~----~----~----~------~----~------~--~---
