Andrew

Firstly, you dont need <CFOUTPUT> around queries.  CFQUERY processes all
outputs within the CFQUERY block anyway.

Put this in your customTag at the top of the file

<cfif isDefined("Attributes.Debug")>
        <cfdump var="#Attributes#"><cfabort>
</cfif>


then pass your values into your custom tag like this

<cf_selectoffices SelectedOfficeID="#SelectedOfficeID#" Debug="true">

what this will do is dump the attributes and their values to the screen

My guess is that the "SelectedOfficeID" value being passed in is making the
query error

Regards
Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Andrew
Dickinson
Sent: Thursday, 22 January 2004 9:29 AM
To: CFAussie Mailing List
Subject: [cfaussie] custom tag weirdness


My first tag is not going according to plan.

I'm attempting to reuse this code :

<cfoutput>
        <cfquery name="getOfficeLocs" datasource="mydata">
                SELECT YOfficeID AS SelectedOfficeID, OfficeName
                FROM    YesOffices
                WHERE   Active = 1
                ORDER BY OfficeName
        </cfquery>
        <cfquery name="getSelectedOffice" datasource="mydata">
                SELECT YOfficeID AS SelectedOfficeID, OfficeName
                FROM YesOffices
                WHERE Active = 1
                        and Yofficeid=#SelectedOfficeID#
        </cfquery>
</cfoutput>

... which sets up for a dropdown menu.

I've saved this code as SelectOffices.cfm, and called it as
<cf_selectoffices> - this is as
the CFMX reference manual suggests.

The problem seems to be the parameter. When I modify the call to
<cf_selectoffices SelectedOfficeID="#SelectedOfficeID#">
it falls over, pointing to an error on this line
"and Yofficeid=#SelectedOfficeID#"

So I went back to the book and followed the starter example, wihch simply
creates a file called date.cfm containing today's date, then calls <cf_date>
from a
different program. This works. However, when I try to pass a parameter,
any parameter, using any of the methods in the book, it doesn't work (i.e
throws an error).

What am I missing here ?







---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to