Hallo,
It is not a problem to parse a SQL-String, I can become the Table Definitions and so on.
I think, you don't understand my problem.
OK. I have a Table: T1 with the Columns: id, NRT2, KBEZ. And I have a Table: T2 with the Columns: id, KBEZ. You see the Relation is 1:n.
The SQL-Statement in the DataSet is: select t1.*, t2.* from t1, t2 where t1.nr = t2.id
OK. Than I have a Grid with the spezified: Columns: id and kbez from the DataSet in the DBGrid. Over the DBGrid, I have an Edit. The user can Insert an Value in this. For Example: 'Frank' and pressed RETURN. My global 'Search Engine' make a new SQL-Statement and write:
select t1.*, t2.* from t1, t2 where t1.nr = t2.id and id like '%FRANK%' or kbez like '%FRANK%'. That occurs an Error.
I musst have the Tablename from the spezified Column in the DBGrid. How can I do that???
Please, help me.
Thanks.
Samson