Hi:
I need to dymanically create a number of columns using the queryAddColumn function.
I was going to use the loop below. That way each column would have a generic dynamically created name.
The problem I'm encountering is that when running that code I get an error that says: "The column name (Detail1) that you specified already exists in this query".
I'm guessing something isn't quite right since apparently on the second iteration of this loop the column name isn't updating to "Detail2".
Any ideas? As always, thanks in advance!! =)
I need to dymanically create a number of columns using the queryAddColumn function.
I was going to use the loop below. That way each column would have a generic dynamically created name.
Code:
<cfloop index="I" from="1" to="#Variables.qProgramDetails.recordcount#">
<cfset temp = QueryAddColumn(#this.RecordSet#, "Detail#I#", "VarChar", newArray) />
</cfloop>
I'm guessing something isn't quite right since apparently on the second iteration of this loop the column name isn't updating to "Detail2".
Any ideas? As always, thanks in advance!! =)
Comment