You don't need the #'s either!
change cfset t1 = #Trim(t1.Team)# to cfset tname1 = Trim(t1.Team)
and cfset logo1 = #Trim(t1.Logo)# to cfset logo1 = Trim(t1.Logo)
thanks,
eric cobb
http://www.cfgears.com
Maureen wrote:
You are using t1 as the name of a query:
cfquery name=t1
I've done this a dozen times before, and now the following code gives me
this error:
You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members.
This is the line throwing the error:
cfset logo1 = #Trim(t1.Logo)#
The logo being pulled
to dereference a scalar variable of type class
java.lang.String as a structure with members.
This is the line throwing the error:
cfset logo1 = #Trim(t1.Logo)#
The logo being pulled from the database is just the image name logo.jpg
cfquery name=Games datasource=hockey
SELECT Team1
Your query assumes that there is only one row expected. What happens when you
put the cfset inside of a cfoutput query tag? How many records are there? See
my modified markup below.
cfquery name=Games datasource=hockey
SELECT Team1, Team2, GameDate, GameTime, Location, Comments FROM Games
You are using t1 as the name of a query:
cfquery name=t1 datasource=hockey
then you set it to a string
cfset t1 = #Trim(t1.Team)#
then you try to use it again as a query name.
cfset logo1 = #Trim(t1.Logo)#
Also, you don't need the quotes around the string on the right of the = sign
change
Thanks,
I realized it after I saw I didn't have the cfoutput tags after the queries!
Rick
-Original Message-
From: Tony Bentley [mailto:cascadefreehee...@gmail.com]
Sent: Monday, April 05, 2010 4:34 PM
To: cf-talk
Subject: Re: java.lang.String as a structure with members
Your query
Hi,
I'm getting a real nasty error and not sure how to fix it.
This is the code:
cfloop collection=#arguments.stArg# item=i
cfset descr = arguments.stArg[i].descr !--- gives You have
attempted to dereference a scalar variable of type class
java.lang.String as a structure with members
it.
This is the code:
cfloop collection=#arguments.stArg# item=i
cfset descr = arguments.stArg[i].descr !--- gives You have
attempted to dereference a scalar variable of type class
java.lang.String as a structure with members. ---
but
cfoutput#arguments.stArg[i].descr#/cfoutput isOK
of the exception.
~Brad
Original Message
Subject: Re: Real stumper: You have attempted to dereference a scalar
variable of type class java.lang.String as a structure with members
From: Mike Chabot mcha...@gmail.com
Date: Tue, November 03, 2009 9:44 pm
To: cf-talk cf-talk
as a structure with members. ---
but
cfoutput#arguments.stArg[i].descr#/cfoutput isOK
/cfloop
The struct is created with structNew () and I can dump it and
everything looks fine, but when I'm trying to access it I'm getting
the error.
What gives?
Server CF 8.01.
Any help would
Thanks Sean, your right the error is in the act fuse. The code comes
from a 4.5 app that sets content = some text therefore FB is trying
to add to the content var by line 44, but its no longer a struct.
On 4/12/05, Sean Corfield [EMAIL PROTECTED] wrote:
On Apr 11, 2005 4:45 PM, Duncan [EMAIL
We have been moving our app to CFMX7 and fb4.1 with no problems until
yesterday when this started to appear. And none of us have a clue as
to what it might mean.
[error]
You have attempted to dereference a scalar variable of type class
java.lang.String as a structure with members.
The error
On Apr 11, 2005 4:45 PM, Duncan [EMAIL PROTECTED] wrote:
We have been moving our app to CFMX7 and fb4.1 with no problems until
yesterday when this started to appear. And none of us have a clue as
to what it might mean.
I'm going to guess that the line number is slightly off and it is
actually
13 matches
Mail list logo