Posted By: Samson TField.Orgin - 03/12/04 06:36 PM
Hallo,

When it is possible to use the "Orgin"-Property of the TField-Object???

I am Programming a dynamic Search-Engine for my Program and must have the table name of the of the Column (Field) from the DBGrid Component.

Thanks for help.

Samson
Posted By: Marco Kalter Re: TField.Orgin - 03/16/04 12:38 AM
No, the Origin property is not set by the TOracleDataSet. You would have to analyze the SQL, the table definition(s) and the field list to determine the actual origin.
Posted By: Samson Re: TField.Orgin - 03/16/04 02:55 PM
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 confused
Posted By: Marco Kalter Re: TField.Orgin - 03/16/04 11:08 PM
I think I understood your question correctly. You will have to perform the analysis I mentioned.
© Allround Automations forums