Hello,
you can use array notation to return your results which will save you from
having to perform an evaluate
<cfset S1 = qryGetSearchType1[ColID1]>
> Having trouble with a dynamic query - I think I have been staring at
> it too long... and have outstretched what little knowledge I have in
> these matters.
>
> Essentially I do this:
>
> <!--- Get the Search 1 --->
> <cfquery name="qryGetSearchType1" datasource="#datasource#"
> username="#username#" password="#password#">
> SELECT
> #ColID1#
> FROM
> #TableSearch1#
> WHERE
> #ColDesc1# = "#FORM.SearchValue1#"
> </cfquery>
>
> This Query Works just fine - the variable are sent from a dynamic
> Combo Box. (Found on this site http://www.mattkruse.
> com/javascript/dynamicoptionlist/)
>
> And THEN - I need the result of the Query - which should only be ONE
> record. A Number!
>
> And I am attempting to set it like:
> <cfset S1 = "qryGetSearchType1.#ColID1#">
>
> But that returns qryGetSearchType1.NationalID
>
> Which as you know is NOT a Number.
>
> Help me Obe Wan Kenobes - your my only hope!
>
-Nick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Captivate from House of Fusion, a Macromedia Authorized Affiliate and
support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=52
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1356
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54