Precision of Numeric Data Types

The following OLE DB data types are used to represent numeric values. Each type has a corresponding maximum precision value that indicates the maximum number of base 10 digits that it can store. The radix of the precision for all numeric types is 10. The maximum precision returned by the provider in the COLUMN_SIZE column of the PROVIDER_TYPES schema rowset is the maximum possible precision for the data type that is supported by the data source. For example, if a data source can only support a maximum precision of 28 for a DBTYPE_NUMERIC column, the provider returns 28, not 39, as the maximum precision.

Type indicator Maximum precision
DBTYPE_I1 3
DBTYPE_I2 5
DBTYPE_I4 10
DBTYPE_I8 19
DBTYPE_UI1 3
DBTYPE_UI2 5
DBTYPE_UI4 10
DBTYPE_UI8 20
DBTYPE_R4 7
DBTYPE_R8 15
DBTYPE_CY 19
DBTYPE_DECIMAL 29
DBTYPE_NUMERIC 39
DBTYPE_VARNUMERIC 255