I forgot to mention that when I use the same notation for a single record query I experience the same result. For example, qryMyResult['coulmn1'] causes the same issue, but qryMyResult.coulmn1 works.
On Feb 5, 12:25 pm, "J.Lucido" <[email protected]> wrote: > I think I may have discovered another issue with cfscript following > the ANTLR parser integration. Specifically, I often loop through query > datasets to 'populate' an object, etc. In doing so I typically use > indexed notation to reference the query column and row (see below). > > for (i = 1; i <= qryMyResult.RecordCount; i++) { > arrayAppend(myArrayOfObjects, > createObject('component','myObject').init( > qryMyResult['coulmn1'][i], > qryMyResult['coulmn2'][i], > qryMyResult['coulmn3'][i], > qryMyResult['coulmn4'][i]);} > > ** Note: the first argument of my object's init() method requires a > numeric datatype > > When I run the code above I get an error stating: "The argument > COLUMN1 passed to function init() is not of type numeric." > > I scratched my head a bit on this issue this past weekend and once I > finally verified I was getting a result for my query, it dawned on me > the changes that took place with cfscript may be at play. Thus, I > changed the above notation style to more of a 'structure' style: > ..... > qryMyResult.coulmn1[i], > qryMyResult.coulmn2[i]. > ..... > > With this change I was back in business and everything worked. While > this is not a show stopper since there are two naming conventions for > this scenario, one that works, I figure others may run into this in > the future. > > Kind regards, > -JSLucido -- Open BlueDragon Public Mailing List http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon mailing list - http://groups.google.com/group/openbd?hl=en !! save a network - please trim replies before posting !!
