I am attepting to build a form by looping the collumn names of a query.
I am returning the collumn names, data_types, and max lengths I am getting this error.
The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a cfif tag.
I am stumped.
<cfquery datasource = "#dsn#" name="thequery">
select column_name as collumnName, data_type as dataType, character_maximum_length as maxlength from information_schema.columns
where table_name = 'myTable'
</cfoutput> <!--- This successfully returns all collumn names , data_types and max lengths --->
<cfform target="_self" method="post" preloader="no">
<cfloop query="#thequery#"> <!--- I get the error at this line of code --->
<cfif datatype EQ "nvarchar">
<cfinput type="text" name="#CollumnName#" maxlength="#maxlength#" label="#collumnName# #datatype#">