Welcome, Guest
  • Author Topic: no result???  (Read 1901 times)

    aki

    • Server what's that
    • *
    • Posts: 39
      • View Profile
      • Email
    no result???
    « on: 06/20/03, 10:30 »
    I am populating listbox with database field1 that has values 1-40

    Selecting value from list box suposed to get more data from DB that field1 = to that value

    here is what I have in Flash for the  result that populates listbox

    Code: [Select]
    function getLotInfo_Result(result) {
       trace("server responded: Records: " + result.getLength());
       trace("Populaing List Box");   
    DataGlue.BindFormatStrings(lb_devs, result, "#lotnum#", "#lotnum#");

       }



    This works fine and I glued values for the list box
    Next is function that is suposed to send filter using listbox


    Code: [Select]
    function getlotDetails() {
       trace("sent request. Lot #: " + lb_devs.getValue());
       lots.getlotDetails(lb_devs.getValue());
    }


    this also works fine, output sends value to the CFC page:

    Connected
    sent request
    server responded: Records: 44
    Populaing List Box
    sent request. Lot #: 10
       

    Next is function in CFC that is not returning any values, I've checked 1000 times all the db names, tables and fields and everything is correct.   Can anyone see what's wrong here?????

    Code: [Select]
     <cffunction name="getlotDetails" access="remote" returnType="query">
         <cfargument name="thislot" type="string">
         <CFQUERY NAME="q_lotDetails" Datasource="database">
           SELECT * FROM lots
           WHERE lotnum='#thislot#'
         </CFQUERY>   
       <cfreturn q_lotDetails>
     </cffunction>



    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:no result???
    « Reply #1 on: 06/20/03, 11:37 »
    I have very punctual experience in CF, anyway, shouldn't be the returnType="recordset" ?

    Jorge

    aki

    • Server what's that
    • *
    • Posts: 39
      • View Profile
      • Email
    Re:no result???
    « Reply #2 on: 06/20/03, 13:15 »
    DUH DUH DUH DUH  ;D :o


    So simple yet so hard .....

    The field that I am filtering by is numeric and in query I have;
     
    Code: [Select]
    where lotnum='#thislot#'  
    so single quotes '     '    are for text values not numerics so it was erroring out!
    « Last Edit: 06/20/03, 13:39 by aki »