Solved

table problem 2

Posted on 2000-04-14
4
156 Views
Last Modified: 2010-04-04
i want to use edit1.text in table.filter
i try:
table1.filter:='name ='+edit1.text;

what's wrong this :)

janozzy
0
Comment
Question by:janozzy
  • 2
  • 2
4 Comments
 

Expert Comment

by:SuperSy
ID: 2717079
Nothing!  

If you are saying that the filter is not working, that is a different issue.  Even though there is nothing wrong with

table1.filter := 'name = ' + edit1.text;

the filter will not work unless you set TDataset.filtered to True.  

In any case, tell what's wrong and how.  =)

0
 

Author Comment

by:janozzy
ID: 2717131
filtered is set to true

i write quake in edit1.text
then comes error FIELD QUAKE NOT FOUND

0
 

Accepted Solution

by:
SuperSy earned 50 total points
ID: 2717164
I think you have to put the text in single quotes. (name = 'quake' instead of name = quake)
Right now your program is testing for equality of field 'name' and field 'quake', and of course the second one will not be found.  

Try this:
Table1.Filter := 'Name = ''' + Edit1.Text + '''';
0
 

Author Comment

by:janozzy
ID: 2717180
thank supersy
now filter works:)
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question