Would anyone know why this works locally,but notremotely?

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

  1. #1

    Default Would anyone know why this works locally,but notremotely?

    This little piece of code works locally and on my old host, but will generate
    an error on my new host (all running CF 6.1)

    <cfquery name="getused1" datasource="JetDB">
    SELECT *
    FROM Used,Dealers
    WHERE Used.Dealer = Dealers.Name
    AND Used.City = Dealers.City
    </cfquery>
    <cfoutput query="getused1">#getused1.City#</cfoutput>

    I get this error
    Element CITY is undefined in GETUSED1.

    Obviously Used.City = Dealers.City is conflicting (I know I havent the best
    coding practices by using the same column name in 2 tables)
    but why would it work on 2 servers but not the third? A simple setting maybe
    (I hope) or total re-code??

    Thank you all in advance


    Brown1 Guest

  2. Similar Questions and Discussions

    1. xml works locally but not on the server
      So I have an html file with a swf in the center which loads pictures and text via XML. It works fine on my own computer but on the actual site it...
    2. webservice works locally but not public
      1: ntsiii yes i can see the wsdl. and it works from my laptop when i run it from flexbuilder. 2: because the result is output in a datagrid. And...
    3. #39370 [NEW]: $_GET no longer works under FastCGI but works under CGI.
      From: trustpunk at gmail dot com Operating system: Windows PHP version: 6CVS-2006-11-04 (snap) PHP Bug Type: CGI related Bug...
    4. Remote XML Data feed works locally - but not on server
      I am hoping someone can help me out here... I have Flash Movie (version 8) - that collects XML data from a dynamically generated XML file (call...
    5. works for me locally, not for him on his server?
      Hello. I learned some PHP in the last couple of days and wrote a trivia game and it works on my PC with XP pro and Apache and PHP but on a...
  3. #2

    Default Re: Would anyone know why this works locally,but notremotely?

    Speaking of best coding practices, stop using select *. Specify your
    fieldnames in the select clause. Select only those fields you need. Use
    aliases if necessary. See if this suggestion solves this specific problem.



    Dan Bracuk Guest

  4. #3

    Default Re: Would anyone know why this works locally,but notremotely?

    Thanks Dan, the problem was solved by using

    <cfoutput query="getused1">#getused1.dealers.City#</cfoutput>

    thanks for your help
    Brown1 Guest

  5. #4

    Default Re: Would anyone know why this works locally,but notremotely?

    The other way you could have solved it is by doing:

    SELECT used.city AS u_city, dealers.city AS d_city

    Then doing #getused1.d_city# inside the CFOUTPUT
    boughtonp 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