Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Before rewriting the code, we need to create a data set that will retrieve the company names from the NWIND CUSTOMERS table.  Launch Launch the Client/Server Workspace and select File New from the menu.  Choose Choose a new DataSet entity, as shown below:

...

The Data Source is the NWIND Connection Object defined in the example that we are rewriting.   (Click here to see how the connection is defined.)

Click on the Scripts tab.  We We need to define the SQL SELECT statement for retrieving the company values.  Instead Instead of specifying this by building a variable in BASIC+, the statement is stored in the Data Set.  The The SQL SELECT statement can return one, all, or a subset of all the rows.  In In this case, we only need to return the CompanyName column.  Enter Enter as shown below:

Then click the Define Columns button.  This This will make the data set define the CompanyName column in the Columns tab.

Save the definition as CUSTOMERS_NWIND.  This This data set will be used in the revised BASIC+ code to populate the combo box.