Page 1 of 1

BCB 2009 TDataSource bug

Posted: Wed 29 Jul 2009 14:07
by albourgz
On a form,
* drop a TOraSession, set connction credentials
* drop a TOraQuery, set a simple select on an existing table, active=true;
* drop a tdatasource, set source to query
* drop a TDBLookupComboBox, change ListSource, keyfield and listfield
* copy/paste TDataSource
* copy/paste TDBLookupComboBox, set listsource to TDataSource2
* on startup, open connection and TOraQuery

launch application
select an item in first combo box
then select an item in second combo box-> First combo is cleared.

This bug also occurs using TQuery.

Does anyone have a workaround?

Thanks

Posted: Thu 06 Aug 2009 07:54
by Plash
TDBLookupComboBox changes the current record of TOraQuery when you select an item in it. You cannot select different items in two comboboxes because TOraQuery may have only one current record.

As a workaround you can use different TOraQuery components for each combobox.

bcb6 ok?

Posted: Thu 06 Aug 2009 08:08
by albourgz
1. I used this workaroud, problem is that database is queried several times (=> performance problem)
2. The problem is due to bcb 2009. As soon as there is one datasource per combobox, it should work (that's why TDataSource exists).
Evidence: bcb 2006, 1 TOraQuery, 2 TDataSources, 2 TDBLookupCombox: it works perfectly.
(and I saw the problem when converting application).