Enumerates the SQL Anywhere .NET database data types.
Public Enum SADbType
public enum SADbType
Member name | Description |
---|---|
BigInt |
Signed 64-bit integer. |
Binary |
Binary data, with a specified maximum length. The enumeration values Binary and VarBinary are aliases of each other. |
Bit |
1-bit flag. |
Char |
Character data, with a specified length. This type always supports Unicode characters. The types Char and VarChar are fully compatible. |
Date |
Date information. |
DateTime |
Timestamp information (date, time). The enumeration values DateTime and TimeStamp are aliases of each other. |
DateTimeOffset |
Timestamp information (date, time) offset. |
Decimal |
Exact numerical data, with a specified precision and scale. The enumeration values Decimal and Numeric are aliases of each other. |
Double |
Double-precision floating-point number (8 bytes). |
Float |
Single-precision floating-point number (4 bytes). The enumeration values Float and Real are aliases of each other. |
Image |
Stores binary data of arbitrary length. |
Integer |
Unsigned 32-bit integer. |
LongBinary |
Binary data, with variable length. |
LongNVarchar |
Character data in the NCHAR character set, with variable length. This type always supports Unicode characters. |
LongVarbit |
Bit arrays, with variable length. |
LongVarchar |
Character data, with variable length. This type always supports Unicode characters. |
Money |
Monetary data. |
NChar |
Stores Unicode character data, up to 32767 characters. |
NText |
Stores Unicode character data of arbitrary length. |
Numeric |
Exact numerical data, with a specified precision and scale. The enumeration values Decimal and Numeric are aliases of each other. |
NVarChar |
Stores Unicode character data, up to 32767 characters. |
Real |
Single-precision floating-point number (4 bytes). The enumeration values Float and Real are aliases of each other. |
SmallDateTime |
A domain, implemented as TIMESTAMP. |
SmallInt |
Signed 16-bit integer. |
SmallMoney |
Stores monetary data that is less than one million currency units. |
SysName |
Stores character data of arbitrary length. |
Text |
Stores character data of arbitrary length. |
Time |
Time information. |
TimeStamp |
Timestamp information (date, time). The enumeration values DateTime and TimeStamp are aliases of each other. |
TimeStampWithTimeZone |
Timestamp information (date, time, time zone). The enumeration values DateTime and TimeStamp are aliases of each other. |
TinyInt |
Unsigned 8-bit integer. |
UniqueIdentifier |
Universally Unique Identifier (UUID/GUID). |
UniqueIdentifierStr |
A domain, implemented as CHAR( 36 ). UniqueIdentifierStr is used for remote data access when mapping Microsoft SQL Server uniqueidentifier columns. |
UnsignedBigInt |
Unsigned 64-bit integer. |
UnsignedInt |
Unsigned 32-bit integer. |
UnsignedSmallInt |
Unsigned 16-bit integer. |
VarBinary |
Binary data, with a specified maximum length. The enumeration values Binary and VarBinary are aliases of each other. |
VarBit |
Bit arrays that are from 1 to 32767 bits in length. |
VarChar |
Character data, with a specified maximum length. This type always supports Unicode characters. The types Char and VarChar are fully compatible. |
Xml |
XML data. This type stores character data of arbitrary length, and is used to store XML documents. |
The table below lists which .NET types are compatible with each SADbType. In the case of integral types, table columns can always be set using smaller integer types, but can also be set using larger types as long as the actual value is within the range of the type.
SADbType | Compatible .NET type | C# built-in type | Visual Basic built-in type |
---|---|---|---|
BigInt | System.Int64 | long | Long |
Binary, VarBinary | System.Byte[], or System.Guid if size is 16 | byte[] | Byte() |
Bit | System.Boolean | bool | Boolean |
Char, VarChar | System.String | String | String |
Date | System.DateTime | DateTime (no built-in type) | Date |
DateTime, TimeStamp | System.DateTime | DateTime (no built-in type) | DateTime |
DateTimeOffset, DateTimeOffset | System.DateTimeOffset | DateTimeOffset (no built-in type) | DateTimeOffset |
Decimal, Numeric | System.String | decimal | Decimal |
Double | System.Double | double | Double |
Float, Real | System.Single | float | Single |
Image | System.Byte[] | byte[] | Byte() |
Integer | System.Int32 | int | Integer |
LongBinary | System.Byte[] | byte[] | Byte() |
LongNVarChar | System.String | String | String |
LongVarChar | System.String | String | String |
Money | System.String | decimal | Decimal |
NChar | System.String | String | String |
NText | System.String | String | String |
Numeric | System.String | decimal | Decimal |
NVarChar | System.String | String | String |
SmallDateTime | System.DateTime | DateTime (no built-in type) | Date |
SmallInt | System.Int16 | short | Short |
SmallMoney | System.String | decimal | Decimal |
SysName | System.String | String | String |
Text | System.String | String | String |
Time | System.TimeSpan | TimeSpan (no built-in type) | TimeSpan (no built-in type) |
TimeStamp | System.DateTime | DateTime (no built-in type) | Date |
TimeStampWithTimeZone | System.DateTimeOffset | DateTimeOffset (no built-in type) | DateTimeOffset |
TinyInt | System.Byte | byte | Byte |
UniqueIdentifier | System.Guid | Guid (no built-in type) | Guid (no built-in type) |
UniqueIdentifierStr | System.String | String | String |
UnsignedBigInt | System.UInt64 | ulong | UInt64 (no built-in type) |
UnsignedInt | System.UInt32 | uint | UInt64 (no built-in type) |
UnsignedSmallInt | System.UInt16 | ushort | UInt64 (no built-in type) |
Xml | System.Xml | String | String |
Binary columns of length 16 are fully compatible with the UniqueIdentifier type.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |