Data Types Reference
Data types for columns and parameters in the Databases configuration are displayed using names derived from ActiveX Data Objects (ADO). The following table shows the mapping between the display names used in a configuration and the corresponding SQL Server and .NET types. The types in Bold are the recommended types to use when mapping database types in GENESIS.
For more information about ADO types and mapping to .NET types, refer to OLE DB Data Type Mappings (external).
Display Name | SQL Server Type | .NET Type | Notes |
---|---|---|---|
Array | N/A | Object | Not used. |
Bigint | bigint | Int64 | Signed 64-bit integer. |
Bigint (unsigned) | bigint | UInt64 | Unsigned 64-bit integer. |
Binary | binary | Byte[] | Binary data. |
Bool | bit | Boolean | A true/false value. |
BSTR | N/A | String | Variable-length string. |
Chapter | N/A | Object | Not used. |
Char | char(n) | String | Fixed-length string. See char and varchar (external). |
Currency | money | Decimal | 16 bytes floating-point. See Floating-point numeric types (external). |
Date | date | DateTime | Date only. |
DateTime | datetime | Date Time | Date and time. |
DateTimeOffset | datetimeoffset | DateTimeOffset | Date, time and a UTC offset. |
DBTimestamp | datetime | DateTime | Date and time. |
Decimal | decimal | Decimal | 16 bytes floating-point. See Floating-point numeric types (external). |
Double | float | Double | 8 bytes floating-point. See Floating-point numeric types (external). |
Empty | N/A | Object | Not used. |
Error | N/A | Object | Not used. |
GUID | uniqueidentifier | Guid | A 16 bytes identifier. See GUID (external). |
IDispatch | N/A | Object | Not used. |
Int | int | Int32 | Signed 32-bit integer. |
Int (unsigned) | int | UInt32 | Unsigned 32-bit integer. |
IUnknown | N/A | Object | Not used. |
LongVarChar | varchar(MAX) | String | Variable-length string. See char and varchar (external). |
LongVarWChar | nvarchar(MAX) | String | Variable-length string. See nchar and nvarchar (external). |
Numeric | decimal | Decimal | 16 bytes floating-point. See Floating-point numeric types (external). |
PropVariant | N/A | Object | Not used. |
REF Cursor (Oracle) | REF Cursor | Object | Used for Oracle REF Cursors. |
Single | real | Single | 4 bytes floating-point. See Floating-point numeric types (external). |
Smallint | smallint | Int16 | Signed 16-bit integer. |
Smallint (unsigned) | smallint | UInt16 | Unsigned 16-bit integer. |
SqlTime | N/A | TimeSpan | Time only. |
Time | time(7) | TimeSpan | Time only. |
Timestamp | timestamp | Byte[] | A binary timestamp. |
Tinyint | N/A | SByte | Signed 8-bit integer. |
Tinyint (unsigned) | tinyint | Byte | Unsigned 8-bit integer. |
User Defined | N/A | Object | Not used. |
VarChar | varchar(n) | String | Variable-length string. See char and varchar (external). |
Variant | sql_variant | Object | Not used. |
VarNumeric | decimal | Decimal | 16 bytes floating-point. See Floating-point numeric types (external). |
VarWChar | nvarchar(n) | String | Variable-length string. See nchar and nvarchar (external). |
WChar | nchar(n) | String | Fixed-length string. See nchar and nvarchar (external). |
XML | xml | Object | Not used. |