0

Sometimes I need to add a column to an empty table

if (listfind(arguments.config[3], "payout"))    {
    QueryAddColumn(local.qryResult, "payout", "cf_sql_float");
    }

I get an error that looks like

enter image description here

It seems to want a java.util.List

Isn't "cf_sql_float" a single element list?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
  • *Isn't "cf_sql_float" a single element list?* You are thinking of a CF list, which is basically a [String](http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html). A `java.util.List` [translates to an Array in CF](http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7884.html) – Leigh Jan 27 '16 at 23:59

1 Answers1

2

The documentation is your guide. You need an array name. I always use arrayNew(). This should do the trick.

QueryAddColumn(local.qryResult, "payout", "cf_sql_double", arrayNew(1));
Dan Bracuk
  • 20,699
  • 4
  • 26
  • 43