Watch, Follow, &
Connect with Us
Public Report
Report From: JBuilder/Components/dbSwing    [ Add a report in this area ]  
Report #:  3259   Status: Reported
picklist property of querydataset changes existing datarows
Project:  JBuilder Build #:
Version:    8.0 Submitted By:   Michael Hoffmann
Report Type:  Crash / Data loss / Total failure Date Reported:  1/5/2003 11:25:41 PM
Severity:    Serious / Highly visible problem Last Updated: 5/2/2003 12:58:35 PM
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
i use 2 tables which are linked by the picklist property

the first table (the one for the lookup) contains the following data:
type_number     type_name
1                          AS
2                          KS
3                          NS

the second table contains the following data:

type    description
AS      row 1
AS      row 2
KS      row 3

the following picklist command is used:

column1.setPickList(new com.borland.dx.dataset.PickListDescriptor(queryDataSet2,
        new String[] {"TYPE_NUMBER"},
        new String[] {"TYPE_NAME"},
        new String[] {"TYPE"},
        "TYP_NAME", false));

this means: in the second table the number is stored in the dataset, but type_name is displayed in the table-component and in the drop-down-picklist
Steps to Reproduce:
under the following circumstances you can reproduce the bug:

1. there are already some existing datasets in the second table (as shown before)
2. when you start to enter a new row, the first existing row is selected --> this means: the new data is entered in the first row and the existing data is now in row 2.....4
3. you first fill in the field type_name, then you select the type number from the picklist --> at this time type_name of the new row is the active component of the table

lets say, you entered "row4" and "NS", the row is not posted at this moment, this means your table looks like this:
type    description
NS      row 4
AS      row 1
AS      row 2
KS      row 3

now, if you click the post button of the JDbNavToolBar you get this result:
type    description
NS      row 1
AS      row 2
KS      row 3
NS      row 4

explanation: row 4 is the last datarow, because the rows are sorted by type
====> and this is the bug: the type of the first row is no longer "AS" as it was before, but now it is "NS" too, like the row you entered last
although row 4 is now the active row (the one which is highlighted), in many cases the field "type_name" still seems to have the focus

if you now close the window and start the application again, you will see that the data is NOT changed, but if you select another row, before you close the application, then the row IS changed

Is this a real bug, do i make any mistakes, does anybody know a workaround?

The same error occured with JBuilder 7.


Server Response from: ETNACODE01