Perfect!

Thanks Dave Works Great!  I knew I wasn't thinking this all the way through.

-Nick

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 28, 2005 2:51 PM
To: CF-Newbie
Subject: RE: Dynamic Query Trouble


<cfset S1 = Evaluate("qryGetSearchType1." & ColID1)>

That's how I'd write it.  Probably a number of ways to do it, but the main
thing is you need to evaluate your string to get the value of it.

Dave

-----Original Message-----
From: Nick Sweeney [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 28, 2005 3:43 PM
To: CF-Newbie
Subject: Dynamic Query Trouble


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





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1357
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

Reply via email to