TField.Orgin

Samson

Member
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
 
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.
 
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:
 
Back
Top