Well first of all, there are a couple of functions that take either form or
URL variables. I suppose I can put some code in there that looks for either
and then create a this.foo var. But I am more concerned as to why this one
function is not working when two other functions that take arguments are not
VAR'd and are working fine?

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 4:20 PM
To: CF-Talk
Subject: Re: What is wrong with this function

VAR your variables etc! ! :-)








"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Bruce Sorge
To: CF-Talk
Sent: Thu Dec 14 00:15:27 2006
Subject: What is wrong with this function

I have a CFC that holds the bulk of my queries. Everything was working great
until I added another function. Now when I open my CFC in the browser to
check everything out, I get the message Cant Load a Null.
The examples below are a function that works and then the new function.
Also, on the function that is not working, if I remove the arguements the
CFC loads fine. I cannot see anything wrong with this function.

Function that works properly
<!--- We need to get a list of the number of Council Districts there are and
use this to match up --->
 <cffunction name="listCouncilDistricts" access="public" returntype="query"
hint="Get a list of the council districts">
  <cfargument name="NCID" type="string" required="yes" hint="ID is required"
default="#ID#">
  <cfquery name="qListDistricts" datasource="#Application.dsource#">
   SELECT *
   FROM tblCouncilDistrict
   WHERE NC_ID = #ID#
  </cfquery>

  <cfreturn qListDistricts>
 </cffunction>

Function that is not working. Removing the Arguments though allows it to
load.
  <!--- Login function for the application --->
  <cffunction name="getLogin" access="public" returntype="query" hint="Get
the user's login information from the database">
   <cfargument name="username" type="string" required="yes" hint="Username
is required" default="#username#">
   <cfargument name="password" type="string" required="yes" hint="Password
is required" default="#password#">
   <cfquery name="qlogin" datasource="#Application.dsource#">
    SELECT Acct_ID, USERNAME,PASSWORD
    FROM ACCOUNTINFO
    WHERE USERNAME=#username# AND PASSWORD=#password#
   </cfquery>

   <cfreturn qlogin>
  </cffunction>






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264016
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to