If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > TADOQuery , Parameters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-14-07, 16:19
dbname12 dbname12 is offline
Registered User
 
Join Date: Apr 2007
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 04-15-07, 06:06
Tyveleyn Tyveleyn is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On