Data Retrieval on Sybase

The SYB connector supports the read and selectdb ProcScript statements, with some restrictions.

Stepped Hitlist

The stepped hitlist mechanism is fully supported. By default, the SYB connector uses a step size of ten (although Uniface sometimes optimizes queries and uses a more optimal step size). This can be overruled by the step size connector option. For more information, see step size.

If an application normally handles more than ten but fewer than 100 records on one form, setting the step size to 100 is useful.

When printing large amounts of data in batch mode with the clear (C) printing option, it is not advisable to disable the stepped hitlist. Without the stepped hitlist, Uniface would have to select everything before starting to format the print file; the time gained with the C option would be lost.

Note:  When printing large amounts of data in batch mode with the clear (C) printing option, it is not advisable to disable the stepped hitlist. Without the stepped hitlist, Uniface would have to select everything before starting to format the print file; the time gained with the C option would be lost.

Note:  The Uniface stepped hitlist is managed using Sybase cursors. If this results in performance problems, you may need to set the same select and rowcount connector options, in combination with the step size. For more information, see Same-Select Mechanism for Hitlist Management.

read

The read ProcScript statement is fully supported, including the where and order by clauses.

When using the where clause, all text between the double quotation marks ("") is inserted into the generated select statement literally as entered. If the Sybase DBMS is configured for ANSI comparisons (ansinull on, which is the default), the results returned by where do not contain null values. You need to write search conditions accordingly. For more information, consult the Sybase documentation.

Sybase handles the u_where clause in all circumstances, and this profile works correctly whether or not the logon path is configured for ansinull.

The order by qualifier is supported. Text and Image fields cannot be included in this qualifier. Sybase does not support the creation of views which include the order by qualifier, but when a view is created, this qualifier can be used to access the view.

selectdb

Sybase and the SYB connector handle the selectdb instruction in all circumstances. For performance reasons, when you use the selectdb ProcScript command, the SYB connector returns the first selected row .

To avoid losing precision, the SYB connector returns a Floating point value (F8) when an average is performed on Integers (Sybase Tinyint, Smallint, and Integer fields). This is done

When a sum is performed on a Sybase Tinyint or Smallint field (I1 or I2), an Integer is returned (I4). Also, when a sum is performed on a Sybase Real field (F4), a Float (F8) is returned. This is done to avoid losing precision.

The following table contains a list of Sybase fields that have restrictions imposed when using selectdb functions:

Restrictions of selectdb functions
Sybase field max min sum ave count
Bit No No No No Yes
Text No No No No No
Image No No No No No
Binary Yes Yes No No Yes
Varbinary Yes Yes No No Yes
Char Yes Yes No No Yes
Varchar Yes Yes No No Yes
Datetime Yes Yes No No Yes
Smalldatetime Yes Yes No No Yes

Retrieve sequential

The retrieveSequential trigger is not supported.

Related Topics