Collection Contents Previous Next PDF

UltraLite Database User's Guide

UltraLite Databases

Setting UltraLite database properties

UltraLite database options


UltraLite databases support the following set of database options, which must be set in the schema file. One set of options controls the handling of dates and times. A second set controls the default handling of arithmetic operations.

Setting database options 

For UltraLite components, the database options must be set in the schema file.

For UltraLite static interfaces, set the options in your Adaptive Server Anywhere reference database.

For information about setting Adaptive Server Anywhere database options, see Setting options.

Date and time options 

The following database options control the default handling of dates and times. These settings can be changed within SQL operations by using functions such as the DATEFORMAT function.

The symbols used in DateFormat, TimeFormat, and TimestampFormat values are taken from the following table:

Symbol Description
yy Two digit year.
yyyy Four digit year.
mm Two digit month, or two digit minutes if following a colon (as in hh:mm).
mmm[m...] Character short form for months—as many characters as there are "m"s. An upper case M causes the output to be made upper case.
d Single digit day of week, (0 = Sunday, 6 = Saturday).
dd Two digit day of month. A leading zero is not required.
ddd[d...] Character short form for day of the week. An upper case D causes the output to be made upper case.
hh Two digit hours. A leading zero is not required.
nn Two digit minutes. A leading zero is not required.
ss[.ss..] Seconds and parts of a second.
aa Indicate AM or PM (12 hour clock).
pp Indicate times after noon by PM (12 hour clock).
jjj Day of the year, from 1 to 366.
Arithmetical operations 

The Precision and Scale options control the handling of arithmetical operations.

For example, when a DECIMAL(8,2) value is multiplied by a DECIMAL(9,2) value, the result could require a DECIMAL(17,4). If Precision is 15, only 15 digits are kept in the result. If Scale is 4, the result is a DECIMAL(15,4). If Scale is 2, the result is a DECIMAL(15,2). In both cases, there is a possibility of overflow.


Collection Contents Previous Next PDF