I can't connect a TDBLookupComboBox to a database as expected (at runtime)
Original Reporter info from Mantis: Swen
-
Reporter name: Swen Heinig
Original Reporter info from Mantis: Swen
- Reporter name: Swen Heinig
Description:
I use the following components in my project:
TDBLookupComboBox -> TDatasource -> TSQLQuery -> TSQLTransaction ->
TIBConnection
I have adjusted the ListSource, ListField and KeyField properties of TDBLookupComboBox. All other properties are on default values. When I activate the SQLQuery at designtime I can see the first value in the DBLookupComboBox. So I guess that the connections are ok. But at runtime the DBLookupComboBox is
empty. I use the following code to connect at runtime:
DataModule1.SQLQuery1.Active:=False;
DataModule1.SQLQuery1.SQL.Clear;
DataModule1.SQLQuery1.SQL.Add('select field1, field2 from table1 order
by field1 desc');
DataModule1.IBConnection1.Connected:=True;
DataModule1.SQLTransaction1.Active:=True;
DataModule1.SQLQuery1.Active:=True;
When I add the line
DBLookupComboBox1.ListSource:= DataSource1;
the TDBLookupComboBox works (both components are already connected with the OI). I got this hint from Michael. He also told me, that I should create the bug report.
Additional information:
The used FPC version is 2.4.0 rc. I also tested the project with win32 (with the same result).
Mantis conversion info:
- Mantis ID: 15410
- OS: Kubuntu x64
- OS Build: 9.10
- Build: 23217
- Version: 0.9.29 (SVN)
- Fixed in revision: 37054 (#2b436be5)
- Monitored by: » dopidaniel (Daniel Simões de Almeida)
- Target version: 1.2.0
- LazTarget: 1.2