Progress
DataServer
for ODBC Guide


Unknown Values

The DataServer supports ODBC data-source null values. Procedures that use a null value behave exactly as they do when accessing an unknown value ("?") in a Progress database, except for one difference—you cannot compare a field to the unknown value if the field is not allowed to hold the unknown value (i.e., is not null-capable). For example, if the cust-num field is not allowed to hold the unknown value, the following statement fails at run time:

FIND cust WHERE cust-num <> ? 

See the documentation for your data source to determine whether it supports null values.

A column that is not allowed to hold the unknown value is marked “mandatory” in the schema holder.

In a DataServer application, you assign the unknown value to a column in an ODBC data source by using the question mark operator (?), which the DataServer translates to the appropriate null-value representation for the data source. For example, the following procedure assigns the unknown value to the address2 field of the customer table:

FIND FIRST customer.
address2 = ?. 

Unknown Values and Sorts

How unknown values are handled during sorts varies depending on the type of data source. If one of the components of your scrolling index is unknown and the data source does not provide a consistent sort order for unknown values, you can force scrolling by using the USE–INDEX phrase with another index whose unique components do not include the unknown value. See your data-source documentation for information on how your data source handles unknown values during sorts.

The ODBC DataServer performs data retrieval against a data source that will allow records in its result sets that have null values in any of its index components. To prevent records in result sets that have null values in their index components, use the Progress startup switch -znnic when you start your Progress client.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095