2 Replies Latest reply on Mar 12, 2008 12:40 PM by paross1

    Query works on localhost but not on server

    Exmachin4
      The quesy runs perfectly on my localhost running cf8 but wont run on our server cf6(i think)

      Error Executing Database Query.
      [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

      Is the error
      and ive tried both these query getting the same error

      SELECT material.materialid, material.material, material.cost, material.qty, material.del, material.unit, material.category, LPMO.Login, LPMO.ProcessId, LPMO.MaterialId, LPMO.OptionId FROM material INNER JOIN LPMO ON material.materialid = LPMO.MaterialId WHERE material.del= False AND LPMO.Login="test"

      SELECT LPMO.*, material.*
      FROM material INNER JOIN LPMO ON material.materialid = LPMO.MaterialId
      WHERE del = false
      AND LPMO.Login= "test"
        • 1. Re: Query works on localhost but not on server
          Dan Bracuk Level 5
          change your double quotes to single quotes. Better yet, use cfqueryparam.
          • 2. Query works on localhost but not on server
            paross1 Level 2
            Change your " characters around your text parameter to ' characters. Also, I'm not sure that false is going to work outside of Access. You probably need to supply the integer value that would mean yes/no or true/false to Access, True (-1) or False (0).

            SELECT material.materialid, material.material, material.cost, material.qty, material.del, material.unit, material.category, LPMO.Login, LPMO.ProcessId, LPMO.MaterialId, LPMO.OptionId
            FROM material
            INNER JOIN LPMO ON material.materialid = LPMO.MaterialId
            WHERE material.del= 0
            AND LPMO.Login='test'


            SELECT LPMO.*, material.*
            FROM material
            INNER JOIN LPMO ON material.materialid = LPMO.MaterialId
            WHERE del = 0
            AND LPMO.Login= 'test'

            Phil