Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
amiller #1
problem with struct containing query
Hello all- I've been having a re-occurring issue involving queries stored
within structures. I have a struct in which one of it's key's is a query. When
I try to loop the query using cfoutput an error occurs. Is this some sort of
bug, or am I just going crazy ? TIA, Aaron
<!--- this returns YES --->
#isQuery(application.department[dept].employees)#
<!--- this returns "Attribute validation error for tag cfoutput" --->
<cfoutput query="application.department[dept].employees)>
<!--- this returns "Comples object types cannot be converted to simple values"
--->
<cfoutput query="#application.department[dept].employees#)>
amiller Guest
-
Query Struct output
Hi Experts, I want to Query Out data in list. MyList = john,mary,roger When I make a query Select * from login table where (userid in... -
Issues with declaring struct arrays inside of a struct
I have the following C++ code: define MAXXPAXX 64 // Pack sub component of database struct. typedef PREFIX_PACKED struct { DWORD packid;... -
Calling fun taking struct and not pointer to struct?
Robert Feldt wrote: I'm a little confused by the question... are you asking if: 1) The act of using a struct in the declaration of another... -
Fwd: Calling fun taking struct and not pointer to struct?
Related to the recent thread about nested structs and Ruby/DL here is the answer from Ruby/DL's author: So that's what I ask you: Is inlining... -
Problem with class, struct, and to_s
On Saturday, July 26, 2003, 2:54:28 AM, ts wrote: G>> irb(main):009:1> def to_s G>> irb(main):010:2> -15 G>> irb(main):011:2> end ... -
MikerRoo #2
Re: problem with struct containing query
Must be the 2nd option (or you're just tired). :-) You seem to have a syntax
error. IS: <cfoutput query='application.department[dept].employees)> Should
Be: <cfoutput query='application.department[dept].employees'> Regards, --
MikeR
MikerRoo Guest
-
amiller #3
Re: problem with struct containing query
Mike- Thanks for pointing that out. Unfortunately the typo is just in my
attached code. I had a bunch of other code in between that I didn't want to
post, so I just typed it. I've cut and pasted in another example, that is from
actual code that results in the errors I mentioned before. I'm still hoping
that I'm missing something here, I've just been looking at this code for so
long I can't figure it out... Thanks again, Aaron
<!--- returns YES --->
<cfoutput>isQuery ?
#isQuery(application.department[dept].employees)#</cfoutput>
<table cellpadding="0" cellspacing="0" border="0" width="175">
<!--- causes error --->
<cfoutput query="application.department[dept].employees">
amiller Guest
-
MikerRoo #4
Re: problem with struct containing query
I new that was too easy! Anyway, it seems that CFOutput does not parse
arrays correctly. I couldn't get your code to work without the dreaded
Evaluate(). So use an intermediate variable. This can actually help debug
and has the advantage of allowing you out of the application variable CFLOCK,
that you are using (right?), quicker. Something like this: <CFSET
qryLclEmployees = application.department[dept].employees> <!--- Array
dereference in CFOutput does not work! ---> <cfoutput query='qryLclEmployees'>
Regards, -- MikeR
MikerRoo Guest
-
amiller #5
Re: problem with struct containing query
MikeR- Thanks again for the reply. Your idea worked just fine, however, I
must assume that this is a bug since simply copying the var into another var
works. Kinda defeats the purpose of having the information stored in the
application scope if I need to copy it into a local variable each time I want
to use it....Oh well, at least I now know I'm not completely nuts ! Thanks
again, Aaron
amiller Guest



Reply With Quote

