Components, Query, Select Box Problem

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Components, Query, Select Box Problem

    :confused;
    I'm new to this.. and cannot for the life of me figure this out. Please help.



    This is the error I am receiving:



    Attribute validation error for tag cfoutput.
    The value of the attribute query, which is currently "GetRelatedWebsiteType",
    is invalid.

    The error occurred in
    C:\inetpub\wwwroot\TOCU\AdminSys\Admin\ManageRelat edWebsites\dsp_add_related_web
    site.cfm: line 60

    58 : <td><select name="sel_URL_Type_req">
    59 : <option value=" ">--Select--
    60 : <cfoutput query="GetRelatedWebsiteType">
    61 : <option value="#GetRelatedWebsiteType.web_Type_ID#"<cfif
    isDefined('Client.sel_URL_Type_req')><cfif Client.sel_URL_Type_ID_req eq
    GetRelatedWebsiteType.web_Type_ID>selected</cfif></cfif>>#GetRelatedWebsiteType.
    web_Type_Name#</option>
    62 : </cfoutput>



    This is my component:


    <cfcomponent>
    <!--- get related website type ID --->
    <cffunction name="Get_RelatedWebsiteType" returntype="query">

    <!--- define variables --->
    <cfargument name="WebTypeID" type="string" required="false">
    <cfargument name="WebTypeName" type="string" required="false">
    <cfargument name="WebTypeDescription" type="string" required="false">

    <!--- get all related website type IDs query --->
    <cfquery name="GetRelatedWebsiteType" datasource="#Application.TOCU_Data#">
    select Lkp_Website_Type.web_type_id, Lkp_Website_Type.web_type_name,
    Lkp_Website_Type.web_type_description
    from Lkp_Website_Type
    where 1=1

    <cfif isDefined("Arguments.WebTypeID")>
    AND Lkp_Website_Type.web_type_id = <cfqueryparam
    value="#Arguments.WebTypeID#" CFSQLType="CF_SQL_VARCHAR">
    </cfif>

    <cfif isDefined("Arguments.WebTypeName")>
    AND Lkp_Website_Type.web_type_name = <cfqueryparam
    value="#Arguments.WebTypeName#" CFSQLType="CF_SQL_VARCHAR">
    </cfif>

    <cfif isDefined("Arguments.WebTypeDescription")>
    AND Lkp_Website_Type.web_type_description = <cfqueryparam
    value="#Arguments.WebTypeDescription#" CFSQLType="CF_SQL_VARCHAR">
    </cfif>
    </cfquery>
    <!--- end of query --->

    <!--- return results --->
    <cfreturn GetRelatedWebsiteType>
    </cffunction>
    <!--- end of get all related website types function --->
    </cfcomponent>



    Here is where they are calling the error from:


    <!---
    <cfinvoke
    component ="#RootURL#Components/Query/qry_Manage_Related_Websites"
    method = "Get_RelatedWebsiteType"
    returnVariable = "GetRelatedWebsiteType">
    </cfinvoke>
    --->



    <form action ="add_related_website_action.cfm" method="post">
    <table>
    <tr>
    <td>*Title:</td>
    <td><input type="text" name="txt_Title_req" size="50"></td>
    </tr>
    <tr>
    <td>*URL:</td>
    <td><input type="text" name="txt_URL_req"></td>
    </tr>
    <tr>
    <td>*URL Type:</td>

    <td><select name="sel_URL_Type_req">
    <option value=" ">--Select--
    <cfoutput query="GetRelatedWebsiteType">
    <option value="#GetRelatedWebsiteType.web_Type_ID#"<cfif
    isDefined('Client.sel_URL_Type_req')><cfif Client.sel_URL_Type_ID_req eq
    GetRelatedWebsiteType.web_Type_ID>selected</cfif></cfif>>#GetRelatedWebsiteType.
    web_Type_Name#</option>
    </cfoutput>
    </select>
    </td>TextText

    julibean Guest

  2. Similar Questions and Discussions

    1. Problem using SELECT TOP and ORDER BY together in a query
      SQL is based on set theory. You are ordering the resultset by the StoryDate. So you have 6 articles at the top of the list. How is the database...
    2. Query of Query to select a title first letter
      The column "title" exists in a normal query. Need to select the first letter of the titles to build a list for a prev-next alphabetical search. ...
    3. SELECT query Error, possible date problem?
      Hello, I have what I thought was a fairly straight forward date based query that is returning an error I cant seem to get past. Here is my...
    4. Using < and > in a select query
      I am trying to write a select query to recieve results between two date ranges i have got these lines in my cfquery tag (example): and...
    5. problem with the select query
      Hi people, this is my first mail to the group. i am having a problem with the select query. There are a few values in few columns of a table with...
  3. #2

    Default Re: Components, Query, Select Box Problem

    Hello, I'm new to this also, and I'm receiving error "attribute validation
    error for tag cfloop". The value of the attribute query, which is currently
    "list_get_sorted_records" is invalid. This happens when I'm trying to locate a
    court case in web page [url]www.courts.gov/[/url]. Do you have any suggestions on what I
    may need to do or not do? Thanks, Rhonda

    pea1963 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