Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: JBuilder/Database    [ Add a report in this area ]  
Report #:  7226   Status: Reported
Bug in db-express when using JdbCombobox with Datasetview and picklist
Project:  JBuilder Build #:
Version:    10.0 Submitted By:   olaf raether
Report Type:  Basic functionality failure Date Reported:  2/9/2004 1:30:53 AM
Severity:    Serious / Highly visible problem Last Updated:
Platform:    All platforms Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: None
The Problem becomes visible when you use
a JdbCombobox in combination with a
DataSetView and picklists in the storagedataset.

testcase is added.

Steps to Reproduce:
Try the following testcase:

import java.awt.*;
import com.borland.jbcl.layout.*;
import javax.swing.*;
import com.borland.dbswing.*;
import com.borland.dx.dataset.*;

* testcase to demonstrate JdbComboBox Bug
* I have one Dataset with one row in it and a Dataset, which is used
as picklist.
* Furthermore i have a DatasetView, based on the Dataset with a
filter in it.
* The filter only accept ID4s > 1, so the sample datarow is ignored
by the filter.
* For the Lookup-Fields in the DatasetView i added two JdbComboBoxes.
* 1. When you start the class there is row shown in the DSV, that
comes from anywhere ???
* 2. Remove the JdbComboBoxes from the panel start again, everything
is ok !
* 3. Adding one more row to the dataset, that the DSV-filter has one
row two accept, it works too.
* So the bug is there when the DSV is empty on start up.
* This problem occurs not only with TableDataset4s. It4s the same
with QueryDataset.
* 02/06/2004

public class Panel2 extends JPanel {
  XYLayout xYLayout1 = new XYLayout();
  TableDataSet tdsEmp = new TableDataSet();
  TableDataSet tdsLookup = new TableDataSet();
  Column colID = new Column();
  Column colNAME = new Column();
  Column colFIRST = new Column();
  Column colLOOKUP = new Column();
  Column colCODE = new Column();
  DataSetView dsvEmp = new DataSetView();
  TableScrollPane tableScrollPane1 = new TableScrollPane();
  JdbTable jdbTable1 = new JdbTable();
  TableScrollPane tableScrollPane2 = new TableScrollPane();
  JdbTable jdbTable2 = new JdbTable();
  Column colLOOKUPID = new Column();
  Column colLOOKUPTEXT = new Column();
  JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();
  JdbNavToolBar jdbNavToolBar2 = new JdbNavToolBar();
  JLabel jLabel1 = new JLabel();
  JLabel jLabel2 = new JLabel();
  JLabel jLabel3 = new JLabel();
  Column colLOOKUP2 = new Column();
  JLabel jLabel4 = new JLabel();
  JdbComboBox jdbComboBox1 = new JdbComboBox();
  JdbComboBox jdbComboBox2 = new JdbComboBox();

  public Panel2() {
    try {
    catch(Exception ex) {
  void jbInit() throws Exception {
    colLOOKUP.setCaption("LU 1");
com.borland.dx.dataset.PickListDescriptor(tdsLookup, new String[]
{"LOOKUPID"}, new String[] {"LOOKUPTEXT"}, new String[] {"LOOKUPID"},
"LOOKUPTEXT", false));
    tdsLookup.setColumns(new Column[] {colLOOKUPID, colLOOKUPTEXT});
    jLabel1.setFont(new java.awt.Font("Dialog", 0, 14));
    jLabel2.setFont(new java.awt.Font("Dialog", 0, 14));
    jLabel3.setFont(new java.awt.Font("Dialog", 0, 12));
    jLabel3.setText("<== Who added this row ?");
com.borland.dx.dataset.PickListDescriptor(tdsLookup, new String[]
{"LOOKUPID"}, new String[] {"LOOKUPTEXT"}, new String[] {"LOOKUP2"},
"LOOKUPTEXT", false));
    tdsEmp.setColumns(new Column[] {colID, colLOOKUP, colNAME,
colFIRST, colCODE, colLOOKUP2});
    jLabel4.setText("<== Remove the Combo, and it works");
    jLabel4.setFont(new java.awt.Font("Dialog", 0, 12));
    this.add(jLabel1,  new XYConstraints(20, 5, -1, -1));
    this.add(jLabel2, new XYConstraints(6, 206, -1, -1));
    this.add(tableScrollPane2,  new XYConstraints(12, 34, 520, 116));
    this.add(jdbNavToolBar1, new XYConstraints(12, 155, 445, 30));
    this.add(jdbNavToolBar2, new XYConstraints(3, 379, 462, 40));
    this.add(tableScrollPane1,  new XYConstraints(5, 238, 534, 131));
    this.add(jLabel3,   new XYConstraints(542, 60, -1, -1));
    this.add(jLabel4,  new XYConstraints(458, 10, -1, -1));
    this.add(jdbComboBox1, new XYConstraints(64, 6, 191, 24));
    this.add(jdbComboBox2, new XYConstraints(269, 5, 187, 25));
    tableScrollPane1.getViewport().add(jdbTable1, null);
    tableScrollPane2.getViewport().add(jdbTable2, null);;

    // Adding these lines, everything is ok !

    tdsLookup.setString("LOOKUPTEXT","LOOKUPTEXT 1");;

    tdsLookup.setString("LOOKUPTEXT","LOOKUPTEXT 2");;

  void dsvEmp_filterRow(ReadRow row, RowFilterResponse response) {
    // Only ID4s greater 1 are shown !
    if (row.getInt("ID") > 1)

class Panel2_dsvEmp_rowFilterAdapter implements
com.borland.dx.dataset.RowFilterListener {
  Panel2 adaptee;

  Panel2_dsvEmp_rowFilterAdapter(Panel2 adaptee) {
    this.adaptee = adaptee;
  public void filterRow(ReadRow row, RowFilterResponse response) {
    adaptee.dsvEmp_filterRow(row, response);

  public static void main (String[] argc) {
    JFrame frame = new JFrame();
    frame.getContentPane().add(new Panel2());

First i thought it is a problem of the JdbCombobox.

But i think the error is in dbexpress in the class
in the method lookup !. There is a call


which should only be called, when the top-Dataset is not empty.

Hope this is the right hint.


Server Response from: ETNACODE01