passing data between a page to retrieve more

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

  1. #1

    Default passing data between a page to retrieve more

    I have a drop down with 5 zip codes pulled from an Access database... they are
    assigned as the primary key. I want to select a zip code from the drop down and
    it to go to another dynamic page..eg. action- (area_stats.cfm) which it does do
    BUT it always picks the first zip code listed in the database NOT the zip code
    the user picked from the drop down. eg. 22142, 22636, 33653, 477474, 47423
    are in the database I pick 33653 in the dop down and click 'submit'... on the
    recieving area_stats.cfm page it acts as is I always pick 22142 Please help

    AWZ Guest

  2. Similar Questions and Discussions

    1. help needed in flash form data passing to cfm page
      I have a flash form that when submitted passes 4 text fields to www.promegasigns.com/thanks.cfm. The action script for the send button in the flash...
    2. Passing grid data from one page to another
      I am posting a page to another page (form post). The data grid on the second page is being populated with data. Now, on page load of the second...
    3. How come Server Explorer can retrieve the data from a Oracle DB, yet my ASP.NET page can't do that?
      Hi, I know this is a stupid question, but I couldn't find an anwser, so please bear with me: The thing I'm doing is simple: Build a ASP.NET...
    4. Passing data to perl script from Web page
      Hey peoples, perhaps you could help me with this tricky code I'm hoping to build. I have developed a small emailing program for my business. At the...
    5. passing data from one page to another
      I have a .aspx page (we'll call it Form1) with a datagrid on it. The datagrid is populated from a dataset that I manually entered data into (the...
  3. #2

    Default Re: passing data between a page to retrieve more

    The query in the "area_stats.cfm" page has to include the passed form field

    Select *
    From table
    Where id = #form.nameofselectlist#

    Ken
    The ScareCrow Guest

  4. #3

    Default Re: passing data between a page to retrieve more

    ok, I'm kinda following this. It seems like it should be so simple... I
    basically want 26505 from a drop down sent to the next page as dynamic text...
    I have my recordset like so SELECT * FROM area_stats WHERE Zip_Code =
    #FORM.Zip_Code# on the receiving page but I always get this error Error
    Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
    1. The error occurred in
    E:\CFusionMX\wwwroot\RealEstateSite\With_fl\Html\a rea_stats_processor.cfm: line
    5 3 : 4 : <cfquery name='zipcode' datasource='realestate'> 5 : SELECT
    Zip_Code FROM area_stats WHERE Form = #URL.Zip_Code# 6 : </cfquery> 7 :
    <cfquery name='zipcodesearch' datasource='realestate'> I know it has to be
    as simple as a form name or ??? I guess I really don't know. Any other tips
    that would make this easy for a newbie?

    AWZ Guest

  5. #4

    Default Re: passing data between a page to retrieve more

    ok, I'm kinda following this. It seems like it should be so simple... I
    basically want 26505 from a drop down sent to the next page as dynamic text...
    I have my recordset like so SELECT * FROM area_stats WHERE Zip_Code =
    #FORM.Zip_Code# on the receiving page but I always get this error Error
    Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
    1. The error occurred in
    E:\CFusionMX\wwwroot\RealEstateSite\With_fl\Html\a rea_stats_processor.cfm: line
    5 3 : 4 : <cfquery name='zipcode' datasource='realestate'> 5 : SELECT
    Zip_Code FROM area_stats WHERE Form = #URL.Zip_Code# 6 : </cfquery> 7 :
    <cfquery name='zipcodesearch' datasource='realestate'> I know it has to be
    as simple as a form name or ??? I guess I really don't know. Any other tips
    that would make this easy for a newbie?

    AWZ Guest

  6. #5

    Default Re: passing data between a page to retrieve more

    From the error message, I would say that the field Zip_Code is text and not a
    number, thus you need to enclose the value in single quotes
    SELECT *
    FROM area_stats
    WHERE Zip_Code = '#FORM.Zip_Code#'

    Ken

    The ScareCrow 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