Hi.
I'm using Delphi 6 Pro with the Zeos Database components to access a MySQL server.
On this database, I've got two tables: adress_type and adress.
adress_type:
ID: INT
type: VARCHAR
adress:
ID: INT
name: VARCHAR
adress_type_ID: INT
adress.adress_type_ID is a "foreign" key referencing adress_type.ID. I'd like to display the contents from adress in a ZDBGrid using the following SQL:
SELECT a.ID, a.name, at.type
FROM adress a LEFT JOIN adress_type at ON a.adress_type_ID = at.ID
Furhter, the column at.type should not be displayed as a simple text column, but it instead it should be a (DB?)LookupComboBox *showing* all the possible values from adress_type and using adress_type.ID as the value.
Well - since I'm new to Delphi, I don't even have the slightest idea how I might do this.
Could somebody please be so kind and try to help me?
Thanks a lot,
Alexander Skwar
I'm using Delphi 6 Pro with the Zeos Database components to access a MySQL server.
On this database, I've got two tables: adress_type and adress.
adress_type:
ID: INT
type: VARCHAR
adress:
ID: INT
name: VARCHAR
adress_type_ID: INT
adress.adress_type_ID is a "foreign" key referencing adress_type.ID. I'd like to display the contents from adress in a ZDBGrid using the following SQL:
SELECT a.ID, a.name, at.type
FROM adress a LEFT JOIN adress_type at ON a.adress_type_ID = at.ID
Furhter, the column at.type should not be displayed as a simple text column, but it instead it should be a (DB?)LookupComboBox *showing* all the possible values from adress_type and using adress_type.ID as the value.
Well - since I'm new to Delphi, I don't even have the slightest idea how I might do this.
Could somebody please be so kind and try to help me?
Thanks a lot,
Alexander Skwar