> I have tried '#a.[current]#', but receive A CFML
variable name cannot end
> with a "." character.
> I tried no quote marks and even double quote marks but
to no avail.
I just set up a test rig on my SQL Server 2005 instance,
thus:
/* table */
CREATE TABLE dbo.tbl_current2(
id int NOT NULL,
[current] varchar(50) NULL
)
/* data */
1, "one"
2, "two"
3, "three"
<!--- CF code --->
<cfquery name="q" datasource="scratch">
select id, [current]
from tbl_current
</cfquery>
<cfloop query="q">
<cfoutput>Current: #current# #q.current#
#q.current[currentRow]#
#q["current"][currentRow]#<br /></cfoutput>
</cfloop>
<cfdump var="#q#">
All of those options work, which is made obvious if one looks
at the
contents of the <cfdump>.
If every you find yourself wondering how to access data (ie,
whether touse
"[current]" or "current") from a complex data structure, the
best thing to
do first is to eyeball it. That makes life a lot easier.
--
Adam