Sybase 2 Barcode Reader User Manual


 
CHAPTER 4 Defining DataWindow Objects
DataWindow Designer User’s Guide 125
3 Press the Tab key to get to the next row to define another computed
column, or click another tab to make additional specifications.
DataWindow Designer adds the computed columns to the list of columns
you have selected.
About computed
columns and
computed fields
Computed columns you define in the Select painter are added to the SQL
statement and used by the DBMS to retrieve the data. The expression you
define here follows your DBMS's rules.
You can also choose to define computed fields, which are created and
processed dynamically by DataWindow Designer after the data has been
retrieved from the DBMS. There are advantages to doing this. For example,
work is offloaded from the database server, and the computed fields update
dynamically as data changes in the DataWindow object. (If you have many
rows, however, this updating can result in slower performance.) For more
information, see Chapter 5, “Enhancing DataWindow Objects.”
Displaying the underlying SQL statement
As you specify the data for the DataWindow object in the Select painter,
DataWindow Designer generates a SQL
SELECT statement. It is this SQL
statement that will be sent to the DBMS when you retrieve data into the
DataWindow object. You can look at the SQL as it is being generated while you
continue defining the data for the DataWindow object.
To display the SQL statement:
Click the Syntax tab to make the Syntax view available, or select
View>Syntax if the Syntax view is not currently displayed.
You may need to use the scroll bar to see all parts of the SQL
SELECT
statement. This statement is updated each time you make a change.
Editing the SELECT
statement
syntactically
Instead of modifying the data source graphically, you can directly edit the
SELECT statement in the Select painter.
Converting from syntax to graphics
If the SQL statement contains unions or the BETWEEN operator, it may not be
possible to convert the syntax back to graphics mode. In general, once you
convert the SQL statement to syntax, you should maintain it in syntax mode.