You are looping over the column names of the query so that your if statement, "<cfif Permissions[Index][currentrow] EQ 1>", will be evaluated for each column. This means that Permissions.Accounting[currentRow] will be compared to the number 1. If it is not a number, the comparison will throw a wobbly.
If Accounting should be a number but can be null in the database, you may want to use <cfif Val(Permission[Index][currentrow]) EQ 1>. Otherwise I suspect your logic may be wrong. Personally, I would avoid being so vague with the column names here. Dominic 2008/12/27 Phillip M. Vector <vec...@mostdeadlygame.com>: > <cfquery datasource="#CloudDatasource#" name="Permissions"> > select * > from Permissions > order by UserID > </cfquery> > > <cfoutput query="Permissions"> > <cfloop index="Index" list="#Permissions.columnlist#"> > <cfif Permissions[Index][currentrow] EQ 1> > True > </cfif> > </cfloop> > </cfoutput> > > > There is in my DB a Column called Accounting and it's an Integer set to 1. > > Why do I get a "The value ACCOUNTING cannot be converted to a number." > error? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317160 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4