Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Posts
    1

    Unanswered: TADOQuery , Parameters

    How can I generate SQL statements with Parameters which will solve the following :

    Select * From ITMS Where (FTHR=0) Order by ITEM_NM
    Select * From ITMS Where (FTHR<>0) Order by ITEM_NM


    This only solve the first one :
    Select * From ITMS Where (FTHR=:M1) Order by ITEM_NM
    // M1 =0


    Thanks

  2. #2
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    Hi,

    Either you'll use two different query components, with their specific clauses and the same parameter or you'll build the string for the TADOQuery.SQL property dynamically with the parameter value hardcoded in the clause.

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •