![]() |
Datenbank: AbsoluteDatabse • Version: 1 • Zugriff über: 1
Filter Record
Hi all,
I need to filter a large database of the selected conditions. ComboBox1 = choice of table columns (FiledByName) ComboBox2 = selection operator (<> =) Edit1 = search text I get an error in this code:
Delphi-Quellcode:
I thank you all for your help.
DataSource1.DataSet.Filtered := False;
DataSource1.DataSet.Filter := QuotedStr(ComboBox1.Text)+ QuotedStr(ComboBox2.Text) + ' '+ QuotedStr(Edit1.text); DataSource1.DataSet.Filtered := True; |
AW: Filter Record
Nobody can help you if you don't describe the error you got. For example it could be a type mismatch error when you try to filter a integer column by a string argument. And you will get an error when you quote the selection operator. Your selection operator is already a string.
|
AW: Filter Record
Morning...
try this. :wink:
Delphi-Quellcode:
...only the Search Value must be quoted.
DataSource1.DataSet.Filtered := False;
DataSource1.DataSet.Filter := ComboBox1.Text + ComboBox2.Text + ' ' + QuotedStr(Edit1.text); DataSource1.DataSet.Filtered := True; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:05 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz