Board index » delphi » TTable.Filter question in C/S app

TTable.Filter question in C/S app

is there a good client/server database programming book
for delphi 4 ?

i develop a database app with d4 c/s.
it is a 3 table database app with
table1----1:n----> table2 ----1:1---->table3
relation.
i use 3 ttables for the 3 database tables
(paradox now, an sql server later !!!).
the ttables are connected together
with id fields:
table1.id1 with table2.id1 and
(table2.id1+table2.id2) with (table3.id1+table3.id2)
the id fields are invisible for program users. all data
are in string fields.

problem for searching data in ALL three connected
tables and displaying the data:

i do not want a result table over all 3 db tables. i want
3 filtered ttables.
have i to use indexes and locate? but i wanted filtered
data (pure client/server).

i tried filter conditions for all three ttables, but with no
luck because of problems with substrings.

"like" conditions doesnt work
field like "%substring%".
same for
field =  '*substring*'

a lot of questions but thanks for any hints.
thomas

--------------------------------
Thomas Richter
Home: Thomas_Rich...@t-online.de
Job:  i...@lfa.mk.lsa-net.de
--------------------------------

 

Re:TTable.Filter question in C/S app


When I need a good book, I go to amazon.com and read the reviews... I've
had pretty good luck with that method.  As for your question on filters,
I am working on a similar scenario. Here's a code snippet:

procedure TForm11.FormShow(Sender: TObject);
begin
    DataModule1.AddrTBL.Filter := 'Vendor = TRUE';
    DataModule1.AddrTBL.Filtered := true;
end;

If you're trying to filter on whether a field contains a certain
substring, I don't think you can.  Better take a look at TQuery.

Quote
Thomas Richter wrote:
> is there a good client/server database programming book
> for delphi 4 ?

> i develop a database app with d4 c/s.
> it is a 3 table database app with
> table1----1:n----> table2 ----1:1---->table3
> relation.
> i use 3 ttables for the 3 database tables
> (paradox now, an sql server later !!!).
> the ttables are connected together
> with id fields:
> table1.id1 with table2.id1 and
> (table2.id1+table2.id2) with (table3.id1+table3.id2)
> the id fields are invisible for program users. all data
> are in string fields.

> problem for searching data in ALL three connected
> tables and displaying the data:

> i do not want a result table over all 3 db tables. i want
> 3 filtered ttables.
> have i to use indexes and locate? but i wanted filtered
> data (pure client/server).

> i tried filter conditions for all three ttables, but with no
> luck because of problems with substrings.

> "like" conditions doesnt work
> field like "%substring%".
> same for
> field =  '*substring*'

> a lot of questions but thanks for any hints.
> thomas

> --------------------------------
> Thomas Richter
> Home: Thomas_Rich...@t-online.de
> Job:  i...@lfa.mk.lsa-net.de
> --------------------------------

--
Randy Blackmond

Other Threads