Skip to main content
May 28, 2009
Question

isQuery Query Object name

  • May 28, 2009
  • 2 replies
  • 1322 views

Hi All,

I am identifying whether a particular structure is a query object or not using isQuery(<some variable name>). If its a query object i need to find out the query object name . I tried getMetaData function but it didnt help . Can anyone help me how to identify the name of the query object.

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    May 29, 2009
    I am identifying whether a particular structure is a query object or not using isQuery(some_variable_name). If its a query object i need to find out the query object name.

    As Dan suggested, some_variable_name.

    May 29, 2009

    Sorry i framed the question wrongly.

    We are storing all complex objects in a structure and sending it to some other function.

    Once the function recieves the structure as paramater , it loops through the structure and it will isolate the query objects(using the isquery function)

    But for some debugging info i need to identify the query object names that was isolated during the isquery function.

    ilssac
    Inspiring
    May 29, 2009

    And I think you are not understanding what everybody is telling you.

    Whatever you pass to the isQuery() function parameter IS the name of the query record set object!  There is no hidden name.  If at one time the query record set was stored under a different variable name before it was passed into the complex structure you are examining has no relevance and stands a good chance of not even existing anymore.

    Inspiring
    May 28, 2009

    Isn't it the value of your variable?

    May 28, 2009

    No not the value of the variable.

    For ex:

    <CFQUERY NAME="check">

    ....

    I need to find the query object name. Like when i check for ifQuery(<object name>) , it should return the query object name. According to the example it should return "check"

    Inspiring
    May 28, 2009

    Sounds like someone needs to read the cfml reference manual.  I'll go first

    http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000529.htm

    It is misleading isn't it.  It doesn't say that the function will either return true or false, but that's what actually happens.