Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am tryin to apply following filter on a AdoTable component but it shows error:

((details_id = 15) OR (details_id = 16) OR (details_id = 17)) AND(personel_id = 5)

the error is :

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

whats the wrong and how can I do this filter. I previously searched it on Delphi help but could not to solve it. Special Thanks in advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
413 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you are trying to make a filter on a table it is much more convenient to use TADOQuery and put:

TADOQuery.SQL.Text := 'SELECT * FROM TableName WHERE ((details_id = 15) OR (details_id = 16) OR (details_id = 17)) AND (personel_id = 5)'

where TableName is the name of your actual table. It is also much easier to manipulate with parameter values this way.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...