• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

queryAddColumn

Guest
Oct 03, 2007 Oct 03, 2007

Copy link to clipboard

Copied

I am having a problem getting this function to work in cf7. My test code is:

<cfset test=queryNew("col1")>
<cfset queryAddColumn(test,"col2","varChar")>
<cfdump var="#test#">

The result is the following error:

Parameter validation error for function QUERYADDCOLUMN.
The value of the parameter 3, which is currently "varChar", must be a interface java.util.List value.

I'm sure it's something dumb, but any help would be much appreciated

Thanks
Fred

TOPICS
Advanced techniques

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Oct 03, 2007 Oct 03, 2007
Looks like you are missing the array-name. The datatype is optional, so since you have only 3 parameters to this function call, the assumption is that the 3rd parameter would be an array-name.

Syntax: QueryAddColumn(query, column-name[, datatype], array-name)

Phil

Votes

Translate

Translate
Mentor ,
Oct 03, 2007 Oct 03, 2007

Copy link to clipboard

Copied

Looks like you are missing the array-name. The datatype is optional, so since you have only 3 parameters to this function call, the assumption is that the 3rd parameter would be an array-name.

Syntax: QueryAddColumn(query, column-name[, datatype], array-name)

Phil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 04, 2007 Oct 04, 2007

Copy link to clipboard

Copied

I would like to add the column without populating it. Is this possible?

Thanks
Fred

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2007 Oct 04, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: timeToPlay
I would like to add the column without populating it. Is this possible?

Thanks
Fred

The easiest way is to have the column in the first place. Assuming the query is coming from a db, select a constant, give it an alias, and there's your column.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2007 Oct 05, 2007

Copy link to clipboard

Copied

LATEST
It's brilliant. It's simple. It's simply brilliant.

Cheers Dan.

"Dan Bracuk" <webforumsuser@macromedia.com> wrote in message
news:fe4bgl$te$1@forums.macromedia.com...
>
quote:

Originally posted by: timeToPlay
> I would like to add the column without populating it. Is this possible?
>
> Thanks
> Fred

> The easiest way is to have the column in the first place. Assuming the
> query
> is coming from a db, select a constant, give it an alias, and there's your
> column.
>
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 04, 2007 Oct 04, 2007

Copy link to clipboard

Copied

Add it in the queryNew() statement or pass in an empty array (ie ArrayNew())

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation