number_mode

This determines the behavior for converting Oracle data with datatype number. A distinct number_mode setting can be defined for each service.

With a setting of 1, ECDA Option for Oracle attempts to return data as tinyint, smallint, int, float or numeric. Overflows are possible.

A setting of 0 was used to support pre-system 10 servers. However, because pre-system 10 servers are no longer supported by ECDA Option for Oracle, a setting of 2 causes all numbers to be returned as numeric. This setting gives the best performance and is the default.

The following table describes how data is returned, based on the number_mode parameter and scale value of the Oracle number datatype.

Table A-4: Rules for Oracle datatype number conversion

Scale

number_mode = 0

number_mode = 1

number_mode = 2

scale = 0

If 0 <= precision <=9 Send back as shown in Table A-5, else send back data as float.

If 0 <= precision <=9, send back as shown else if precision is valid, send back data as numeric, else send back data as float.

If precision is valid, send back data as numeric, else send back data as float.

scale !=0

Send back data as float.

If valid precision and scale, send back data as numeric, else send back data as float.

If valid precision and scale, send back data as numeric.

Table A-5: Conversion for Oracle datatype number

Oracle datatype

Sybase datatype

number(1,0)

tinyint

number(2,0)

tinyint

number(3,0)

smallint

number(4,0)

smallint

number(5,0)

int

number(p,0) where 5 <= p <= 9

int

This parameter is dynamic.