Board index » delphi » Self-Join as Lookup-Field?

Self-Join as Lookup-Field?

Hallo,

I've a table, e.g. named MyTable, with the following structure part:

MyTable
---------
- ID, Integer (Primary Key)
- Description, String
- ParentID, Integer (Foreign Key to the table itself, or in other words: a
Foreign Key to MyTable)

When I want to build a Lookup-Field in Delphi 5 Enterprise, I get the error
message of a circulare reference.

How can I build such a Self-Join as a Lookup-Field, so if I place the
corresponding DB-Controls on a form, so I want to set the field ParentID via
LookupComboBox, which shows the Description-field.

Best regards
Stephan Schneider

 

Re:Self-Join as Lookup-Field?


Use a second TTable for the lookup field.

--
Bill

Other Threads