The problem seems to be trying to add a  struct to the "varChar" typed new 
column.

Here is the code that is a work here: 

            <cfset queryAddColumn(getEm,"categories","varChar",arrayNew(1))>
            <cfloop query="getEm">
                <cfquery name="getCategories" datasource="#instance.dsn#" 
username="#instance.username#" password="#instance.password#">
                    select    categoryid,categoryname
                    from    tblblogcategories, tblblogentriescategories
                    where    tblblogentriescategories.entryidfk = 
<cfqueryparam value="#getEm.id#" cfsqltype="CF_SQL_VARCHAR" maxlength="35">
                    and        tblblogentriescategories.categoryidfk = 
tblblogcategories.categoryid
                </cfquery>
                <!---
                <cfset 
querySetCell(getEm,"categoryids",valueList(getCategories.categoryID),currentRow)>
                <cfset 
querySetCell(getEm,"categorynames",valueList(getCategories.categoryname),currentRow)>
                --->
                <cfset catData = structNew()>
                <cfloop query="getCategories">
                    <cfset catData[categoryID] = categoryName>
                </cfloop>
                <cfset querySetCell(getEm,"categories",catData,currentRow)>
            </cfloop>
Line 1 adds a new column of type "varChar" to the query. The includion of 
the datatype is my addition to get this function to work.

Later on near the end a struct *catData* is created of values from another 
query. Then querySetCell is used to try to add this strcut to the new 
varChar-typed column. This errors with *Invalid data for column of type 
null*.

I have replicated this with some simpler code and get the same error. One 
thing is that the error message doesn`t seem to be picking up the column 
type making  it a little confusing. But it should error as the data doesn`t 
match the column type.

Then I had a little revelation...

On Saturday, 23 May 2015 03:56:46 UTC-7, Alan Williamson wrote:
>
>  Thanks Magnus.
>  
> Can you do me a favor and pull together an example in a single page that 
> reproduces the problem and log it as an issue with the GitHub site?   We 
> will look at it and see what is going on.
>  
> ------ Original Message ------
> From: "Magnus" <[email protected] <javascript:>>
> To: [email protected] <javascript:>
> Cc: [email protected] <javascript:>
> Sent: 23-May-15 00:13:40
> Subject: Re: [OpenBD] OpenBD vs.BlogCFC
>  
>  
> For the sake of brevity, I will only post one row:
> The value of the new column "categores" is for all the rows [null].
>
>

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to