Print Thread
TField.Orgin
#6176 03/12/04 06:36 PM
Joined: Mar 2004
Posts: 3
S
Samson Offline OP
Member
OP Offline
Member
S
Joined: Mar 2004
Posts: 3
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

Re: TField.Orgin
#6177 03/16/04 12:38 AM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
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.


Marco Kalter
Allround Automations
Re: TField.Orgin
#6178 03/16/04 02:55 PM
Joined: Mar 2004
Posts: 3
S
Samson Offline OP
Member
OP Offline
Member
S
Joined: Mar 2004
Posts: 3
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

Re: TField.Orgin
#6179 03/16/04 11:08 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
I think I understood your question correctly. You will have to perform the analysis I mentioned.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.094s Queries: 13 (0.040s) Memory: 2.5062 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-04-29 04:42:40 UTC
Valid HTML 5 and Valid CSS