Intro

The data type determines the kind of data the data is. In programming, variables are usually declared as being of a particular data type. This is done so that the program can tell the computer to reserve a customized amount of memory. In fact some languages require that all variables be declared.

The most common data types may be grouped into data groups. The examples below are typical data types for ISO, but they are very year dependent. EGs: SQL-86, SQL-89, SQL-92, SQL:1999, SQL:2003. See also SQL Server Datatypes.

Floating Point Numbers

A floating point number is the digital representation of many rational numbers.

A = M × be

The "floating point number", A, is represented by two numbers:

Here are some example floating point numbers:

1.2 * 10^2 = 1.2e2 = 120e0. These are equal in value to integer number of 120.

-0.12e0 = -1.2e-1 = -1.2 * 10^-1. These are equal to the fixed point notation of -0.12.

Computers use binary so they can only represent certain numbers approximately with floating point notation. It is for this reason that fixed point notation is preferable in certain situations (such as money calculations). EG: 0.1 can only be approximated in floating point notation, but can be represented exactly with fixed point notation.

In one sense floating point numbers are no more than A = M × be, but since it is concerned with the digital representation, such a datatype must be able to represent other values such as infinities and NaN (not a number). According to IEEE 754 (Standard for Binary Floating-Point Arithmetic), the most common standard for floating point computations, specifies four formats for representing floating point values.

FYI: One of the older definitions of "mantissa" wasn't even mathematical: a "mantissa" was a minor addition or supplement, usu. an added statement. Later on, especially in the days of slide rules, the word "mantissa" referred to the fractional part of a common logarithm. EG:

log10 120 =
log10 (102 * 1.2) =
log10 (1.2 * 102) =
log10 (102) + log10 (1.2) ~
2 + 0.079181

The 2 was the characteristic and the 0.079181 was the "mantissa".

Microsoft ADO

The DataTypeEnum can be used by the ADO Field, Parameter, and Property objects.

Common Constant Value Description
  AdArray
(Does not apply to ADOX.)
0x2000 A flag value, always combined with another data type constant, that indicates an array of that other data type.
  adBigInt 20 Indicates an eight-byte signed integer (DBTYPE_I8).
X adBinary 128 Indicates a binary value (DBTYPE_BYTES).
X adBoolean 11 Indicates a boolean value (DBTYPE_BOOL).
  adBSTR 8 Indicates a null-terminated character string (Unicode) (DBTYPE_BSTR).
  adChapter 136 Indicates a four-byte chapter value that identifies rows in a child rowset (DBTYPE_HCHAPTER).
X adChar 129 Indicates a string value (DBTYPE_STR).
X adCurrency 6 Indicates a currency value (DBTYPE_CY). Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an eight-byte signed integer scaled by 10,000.
X adDate 7 Indicates a date value (DBTYPE_DATE). A date is stored as a double, the whole part of which is the number of days since December 30, 1899, and the fractional part of which is the fraction of a day.
X adDBDate 133 Indicates a date value (yyyymmdd) (DBTYPE_DBDATE).
X adDBTime 134 Indicates a time value (hhmmss) (DBTYPE_DBTIME).
X adDBTimeStamp 135 Indicates a date/time stamp (yyyymmddhhmmss plus a fraction in billionths) (DBTYPE_DBTIMESTAMP).
X adDecimal 14 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_DECIMAL).
X adDouble 5 Indicates a double-precision floating-point value (DBTYPE_R8).
  adEmpty 0 Specifies no value (DBTYPE_EMPTY).
  adError 10 Indicates a 32-bit error code (DBTYPE_ERROR).
  adFileTime 64 Indicates a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME).
  adGUID 72 Indicates a globally unique identifier (GUID) (DBTYPE_GUID).
  adIDispatch 9 Indicates a pointer to an IDispatch interface on a COM object (DBTYPE_IDISPATCH).

Note   This data type is currently not supported by ADO. Usage may cause unpredictable results.

X adInteger 3 Indicates a four-byte signed integer (DBTYPE_I4).
  adIUnknown 13 Indicates a pointer to an IUnknown interface on a COM object (DBTYPE_IUNKNOWN).

Note   This data type is currently not supported by ADO. Usage may cause unpredictable results.

  adLongVarBinary 205 Indicates a long binary value (Parameter object only).
  adLongVarChar 201 Indicates a long string value (Parameter object only).
  adLongVarWChar 203 Indicates a long null-terminated Unicode string value (Parameter object only).
X adNumeric 131 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC).
  adPropVariant 138 Indicates an Automation PROPVARIANT (DBTYPE_PROP_VARIANT).
X adSingle 4 Indicates a single-precision floating-point value (DBTYPE_R4).
X adSmallInt 2 Indicates a two-byte signed integer (DBTYPE_I2).
  adTinyInt 16 Indicates a one-byte signed integer (DBTYPE_I1).
  adUnsignedBigInt 21 Indicates an eight-byte unsigned integer (DBTYPE_UI8).
  adUnsignedInt 19 Indicates a four-byte unsigned integer (DBTYPE_UI4).
  adUnsignedSmallInt 18 Indicates a two-byte unsigned integer (DBTYPE_UI2).
  adUnsignedTinyInt 17 Indicates a one-byte unsigned integer (DBTYPE_UI1).
  adUserDefined 132 Indicates a user-defined variable (DBTYPE_UDT).
  adVarBinary 204 Indicates a binary value (Parameter object only).
  adVarChar 200 Indicates a string value (Parameter object only).
  adVariant 12 Indicates an Automation Variant (DBTYPE_VARIANT).

Note   This data type is currently not supported by ADO. Usage may cause unpredictable results.

  adVarNumeric 139 Indicates a numeric value (Parameter object only).
  adVarWChar 202 Indicates a null-terminated Unicode character string (Parameter object only).
  adWChar 130 Indicates a null-terminated Unicode character string (DBTYPE_WSTR).

Page Modified: (Hand noted: 2007-10-05 19:18:45Z) (Auto noted: 2007-11-17 06:47:52Z)