D2: Fatal bug in DBLookupComboBox and ListBox - testdblu.zip [01/01]

D2: Fatal bug in DBLookupComboBox and ListBox - testdblu.zip [01/01]

Post by Brad Ai » Sat, 01 Jun 1996 04:00:00



I have discovered what seems to be a fatal bug in the new data lookup
facility. This problem occurs using Interbase tables, but also with
Paradox. I have attached a small sample application (~8K zipped) and data
to demonstrate it.

The new lookup facility in Delphi 2 is supposed to greatly simplify dealing
with codes that have values looked up in other tables. This seems to work
fine when the key is only a single field. But the system is supposed to
work with multi-value keys. In the enclosed project, there is a Code table,
which has two lookup fields: Dept (raw)/DeptLu (lookedup) and Pos
(raw)/PosLu (looked up) -- DeptLu comes from the Costcent tables, and PosLu
from the Cost_pos table. The Pos lookup involves two keys: Dept and Pos. In
other words, there are Departments (with descriptions), and within
Departments, there are Positions -- this sort of thing is very common.

What happens, is that the lookups look up ok, and will display in a DBedit
or in the grid. The single Dept lookup works fine in a combo box. The
Dept:Pos works fine if you are only displaying in a dbedit, but if you try
to connect a DBLookupComboBox (or ListBox) to the PosLU field, you get an
error message "field "DEPT;POS" not found". If you use the DBGrid, and try
to edit that field at run time, you get the same message (presumably,
Delphi creates such a combo box dynamically at run time when you try
editing, thus the same error condition). This conditions crashes the
program.

If anyone has seen this before, or has any suggestion for a work around, I
would appreciate it. If Borland knows about this, I would like to know when
we could get a fix.
BEGIN -- Cut Here -- cut here
begin 644 testdblu.zip
<uuencoded_portion_removed>
`
end
END -- Cut Here -- cut here

--

Software Designer
Business Machine Interfaces, Inc.
Toronto, Ontario, Canada