sean, thanks for the ideas...im in the middle
of a golf tourney all weekend, (we are currently in
first, only two 9 hole matches left...)
and cant get into this, but i will on monday..i will hit
you all up then!!!

anyhow, to answer a few of the questions...i have code there
for a null value, to set the value as nothing if there is a null
value, and it works on lines before and after it perfectly, thats
why its soo freakin elusive, any how...ill touch base with y'all
later on monday.

thanks!!!

tony

-----Original Message-----
From: Sean A Corfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 12:27 PM
To: CF-Talk
Subject: Re: runtime local var scope.


On Friday, May 30, 2003, at 08:00 US/Pacific, Tony Weeg wrote:
> what var scope should I use here in this instance....
>
> here is the cfif block to check for the existence of the needed
> parameter to make the query...

Is the code below inside the scope of another query/loop? If so, 
perhaps routeName clashes with a column in the outer query.

> <cfif isDefined("ReportWriterOld.driverId") and
> isNumeric(ReportWriterOld.driverId)>

Stylistically I'd use structKeyExists(ReportWriterOld,"driverId") over 
isDefined() but that's a minor issue :)

>       <cfquery name="getRouteName" datasource="#myDS#" maxrows="1">
>               select name, narcReady, toteReady, outpatientReady,
> lateBy
>               from routes
>               where beginTime <= #timeIdAdj# and (endTime >=
> #timeIdAdj# or endTime is null)
>               and dId = #ReportWriterOld.DriverId#
>       </cfquery>
>
>       <cfset routeName = "#getRouteName.name#">

What if the query returns no records?

> <cfelse>
>       <cfset routeName = "No driver Id (old)">        
> </cfif>
> it's the spots where I set route name, that im wondering what scope to
> make them?

Difficult to answer that question without knowing how you are using it. 
Would "variables" scope be enough?

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to