iOSSQLiteRecordSet.ColumnType

From Xojo Documentation

Method

iOSSQLiteRecordSet.ColumnType(index As Integer) As Integer

Supported on Mobile(iOS).

Identifies the type of the specific column index (0-based).

Notes

SQLite uses type affinities rather than fixed data types. This method returns the affinity of a column, but you can still store any value in the column regardless of its type.

Value Type Description
0 Null Denotes the absence of any value, i.e., a missing value.
1 Byte Stores the byte representation of a character string.
2 SmallInt A numeric data type with no fractional part. The maximum number of digits is implementation-specific, but is usually less than or equal to INTEGER. SQLite supports 4-byte smallints. If you are using another data source, check the documentation of your data source.
3 Integer A numeric data type with no fractional part. The maximum number of digits is implementation-specific. SQLite supports 8-byte integer columns and the FieldType evaluates to 19 (64-bit integer).
4 Char Stores alphabetic data, in which you specify the maximum number of characters for the field, i.e., CHAR(20) for a 20 character field. This works the same as Text or VarChar in SQLite.
5 Text or VarChar Stores alphabetic data, in which the number of characters vary from record to record, but you don't want to pad the unused characters with blanks.
6 Float Stores floating-point numeric values with a precision that you specify, i.e., FLOAT(5). The precision is not used with SQLite.
7 Double Stores double-precision floating-point numbers.
8 Date Stores year, month, and day values of a date in the format YYYY-MM-DD. The year value is four digits; the month and day values are two digits.
9 Time Stores hour, minute, and second values of a time in the format HH:MM:SS. The hours and minutes are two digits. The seconds values is also two digits, may include a optional fractional part, e.g., 09:55:25.248. The default length of the fractional part is zero.
10 TimeStamp Stores both date and time information in the format YYYY-MM-DD HH:MM:SS. The lengths of the components of a TimeStamp are the same as for Time and Date, except that the default length of the fractional part of the time component is six digits rather than zero. If a TimeStamp values has no fractional component, then its length is 19 digits If it has a fractional component, its length is 20 digits, plus the length of the fractional component.
11 Currency This is a 64-bit fixed-point number format that holds 15 digits to the left of the decimal point and 4 digits to the right.
12 Boolean Stores the values of TRUE or FALSE.
13 Decimal tores a numeric value that can have both an integral and fractional part. You specify the total number of digits and the number of digits to the right of the decimal place, i.e., DECIMAL (5.2) specifies a decimal field that can contain values up to 999.99. DECIMAL (5) specifies a field that can contain values up to 99,999.
14 Blob Stores code, images, and hexadecimal data.
15 Blob Stores a text object.
16 Blob Stores a binary object. SQLite supports blobs of up to any size. Furthermore, a blob can be stored in a column of any declared data affinity.
19 Int64 Stores a 64-bit integer. Integer fields in SQLite are 64-bits and FieldType returns 19.
255 Unknown Unrecognized data type.