Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default CF Custom Query

    Hi,

    I'm getting this error - ' Variable GETARTICLES is undefined.'

    Now what I have is a file which calls the custom tag, see below:

    example.cfm

    <cftry>

    <cfquery name="getArticles" datasource="whatever">

    select *
    from table1,table2
    where table1.catID = table2.cat_ID
    order by table1.news_date desc

    </cfquery>

    <cfcatch type="Any">
    You need to set up a datasource named <b><i>contacts</i></b> with the file
    contacts.mdb to run this example.
    </cfcatch>
    </cftry>

    <cf_direct
    query="#getArticles#">

    direct.cfm

    <cfif thisTag.executionMode eq "end" >
    <cfexit method="exittag" />
    </cfif>

    <cfsetting enablecfoutputonly="Yes">
    <cfparam name="attributes.query" type="query">

    Now I haven't a clue what I have to do to correct this. Can anyone shed some
    light on this?

    Thanks

    :)

    G_Park Guest

  2. Similar Questions and Discussions

    1. Need help with building a custom query
      Hi everybody. How can I create a custom query based on argument passed to CFC? Here is a sample code: <cffunction name="get_all_brands"...
    2. return query resultset from custom tag
      Hi, How to return an entire query resultset from custom tag to the calling page ? Thanks for your help. vmrao
    3. Query of Queries on query New type query
      In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could...
    4. Can't pass a query out of a custom tag
      I am attempting to extract a query from a custom tag. I am passing several variables into a custom tag using CFMODULE. I then run a query based...
    5. Datagrid custom control feature query
      Hi, I have a user control in which i am creating dynamically a datagrid control, with the given dataset. But now I would like to add features to...
  3. #2

    Default Re: CF Custom Query

    Hmmm. Where are you getting the error? Inside of direct.cfm? If so, try referencing by caller.getArticles
    Mike Greider Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139