Hi
I need some help with the Filter option of a ZTable. I use BCB6 and Zeos 6.6.1. In my database tables have numeric codes as fieldnames ("010", "011" etc.) Data type is "currency".
When I try to use a filter I get an empty dataset:
ZTable1->Filter="010 = '321' ";
ZTable1->Filtered=true;
What is wrong?
Filter option of a ZTable
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 2
- Joined: 12.03.2008, 22:02
- Contact:
-
- Expert Boarder
- Posts: 158
- Joined: 06.11.2005, 01:43
-
- Fresh Boarder
- Posts: 2
- Joined: 12.03.2008, 22:02
- Contact:
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi,
I'm not sure what database you are using, but I think you have to quote the Table names in the right way for your database. eg for mysql you should use backticks like
Otherwise the database server does a numeric compare betwen your table name and the value searched for.
More generally, this is one of the reasons why it's not really a good idea to use purely numeric field names.
Mark
I'm not sure what database you are using, but I think you have to quote the Table names in the right way for your database. eg for mysql you should use backticks like
Code: Select all
ZTable1->Filter="`010` = 321 ";
More generally, this is one of the reasons why it's not really a good idea to use purely numeric field names.
Mark