[Gambas-user] DataCombo doesn't work

Benoît Minisini gambas at ...1...
Sun Sep 6 12:16:05 CEST 2009


> Benoît Minisini schrieb:
> > DB.Debug = TRUE, and all SQL request sent to the database driver are
> > print on the standard error.
>
> DB.Debug = TRUE is fine, but doesn't display this error.
>
> Try this tiny silly test file (never did tar.gz before, hope it works)
> If you can use it:
> Set these properties:
> DataCombo1.Table = Metzger
> .Field = MetzID
> .Display = Name

DataCombo works, but the name of the field in the main table and the name of 
the other table primary key must be the same.

In other words, replace Metzger.id by Metzger.MetzID, set the Table property 
of the DataCombo, and everything is fine.

Not using the same name for common keys is a very bad practise in SQL. But I 
admit there are some case where it is not possible, and I should add a 
property in DataCombo to specify the table key field.

Regards,

-- 
Benoît




More information about the User mailing list