枚举 SQL Anywhere .NET 数据库数据类型。
Public Enum SADbType
public enum SADbType
成员名称 | 说明 |
---|---|
BigInt |
有符号 64 位整数。 |
Binary |
二进制数据,具有指定的最大长度。 枚举值 Binary 和 VarBinary 互为对方的别名。 |
Bit |
1 位标志。 |
Char |
字符数据,具有指定长度。 此类型始终支持 Unicode 字符。类型 Char 与 VarChar 完全兼容。 |
Date |
日期信息。 |
DateTime |
时间戳信息(日期、时间)。 枚举值 DateTime 和 TimeStamp 互为对方的别名。 |
DateTimeOffset |
时间戳信息(日期、时间)偏移。 |
Decimal |
精确数字数据,具有指定的精度和小数位数。 枚举值 Decimal 和 Numeric 互为对方的别名。 |
Double |
双精度浮点数(8 个字节)。 |
Float |
单精度浮点数(4 个字节)。 枚举值 Float 和 Real 互为对方的别名。 |
Image |
存储任意长度的二进制数据。 |
Integer |
无符号 32 位整数。 |
LongBinary |
二进制数据,具有可变长度。 |
LongNVarchar |
NCHAR 字符集中的字符数据,具有可变长度。 此类型始终支持 Unicode 字符。 |
LongVarbit |
具有可变长度的位数组。 |
LongVarchar |
字符数据,具有可变长度。 此类型始终支持 Unicode 字符。 |
Money |
货币数据。 |
NChar |
存储 Unicode 字符数据,最多可存储 32767 个字符。 |
NText |
存储任意长度的 Unicode 字符数据。 |
Numeric |
精确数字数据,具有指定的精度和小数位数。 枚举值 Decimal 和 Numeric 互为对方的别名。 |
NVarChar |
存储 Unicode 字符数据,最多可存储 32767 个字符。 |
Real |
单精度浮点数(4 个字节)。 枚举值 Float 和 Real 互为对方的别名。 |
SmallDateTime |
一个域,以 TIMESTAMP 形式实现。 |
SmallInt |
有符号 16 位整数。 |
SmallMoney |
存储不足一百万货币单位的货币数据。 |
SysName |
存储任意长度的字符数据。 |
Text |
存储任意长度的字符数据。 |
Time |
时间信息。 |
TimeStamp |
时间戳信息(日期、时间)。 枚举值 DateTime 和 TimeStamp 互为对方的别名。 |
TimeStampWithTimeZone |
时间戳信息(日期、时间、时区)。 枚举值 DateTime 和 TimeStamp 互为对方的别名。 |
TinyInt |
无符号 8 位整数。 |
UniqueIdentifier |
通用唯一标识符(Universally Unique Identifier,简称 UUID/GUID)。 |
UniqueIdentifierStr |
一个域,以 CHAR(36) 形式实现。 UniqueIdentifierStr 用于在映射 Microsoft SQL Server uniqueidentifier 列时进行远程数据访问。 |
UnsignedBigInt |
无符号 64 位整数。 |
UnsignedInt |
无符号 32 位整数。 |
UnsignedSmallInt |
无符号 16 位整数。 |
VarBinary |
二进制数据,具有指定的最大长度。 枚举值 Binary 和 VarBinary 互为对方的别名。 |
VarBit |
位数组的长度是从 1 到 32767 位之间的值。 |
VarChar |
字符数据,具有指定的最大长度。 此类型始终支持 Unicode 字符。类型 Char 与 VarChar 完全兼容。 |
Xml |
XML 数据。 此类型可存储任意长度的字符数据,也用来存储 XML 文档。 |
下表列出了与每种 SADbType 兼容的 .NET 类型。对于整型而言,表列始终都可以使用较小的整型来进行设置;但只要实际值在该类型取值范围之内,也可以使用较大的整型来进行设置。
SADbType | 兼容的 .NET 类型 | C# 内置类型 | Visual Basic 内置类型 |
---|---|---|---|
BigInt | System.Int64 | long | Long |
Binary, VarBinary | System.Byte[],或 System.Guid(如果大小为 16) | byte[ ] | Byte() |
Bit | System.Boolean | bool | Boolean |
Char, VarChar | System.String | String | String |
Date | System.DateTime | DateTime(无内置类型) | Date |
DateTime, TimeStamp | System.DateTime | DateTime(无内置类型) | DateTime |
DateTimeOffset | System.DateTimeOffset | DateTimeOffset(无内置类型) | 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(无内置类型) | 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(无内置类型) | TimeSpan(无内置类型) |
TimeStamp | System.DateTime | DateTime(无内置类型) | Date |
TimeStampWithTimeZone | System.DateTimeOffset | DateTimeOffset(无内置类型) | DateTimeOffset |
TinyInt | System.Byte | byte | Byte |
UniqueIdentifier | System.Guid | Guid(无内置类型) | Guid(无内置类型) |
UniqueIdentifierStr | System.String | String | String |
UnsignedBigInt | System.UInt64 | ulong | UInt64(无内置类型) |
UnsignedInt | System.UInt32 | uint | UInt64(无内置类型) |
UnsignedSmallInt | System.UInt16 | ushort | UInt64(无内置类型) |
Xml | System.Xml | String | String |
长度为 16 的二进制列与 UniqueIdentifier 类型完全兼容。
![]() |
使用DocCommentXchange讨论此页。
|
版权 © 2013, SAP 股份公司或其关联公司. - SAP Sybase SQL Anywhere 16.0 |