Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere .NET 2.0 API 参考 » iAnywhere.Data.SQLAnywhere 命名空间 (.NET 2.0)

 

SADbType 枚举

枚举 SQL Anywhere .NET 数据库数据类型。

语法
Visual Basic

Public Enum SADbType 
C#

public enum SADbType 
注释

下表列出了与每种 SADbType 兼容的 .NET 类型。对于整型而言,表列始终都可以使用较小的整型来进行设置;但只要实际值在该类型取值范围之内,也可以使用较大的整型来进行设置。

SADbType

兼容的 .NET 类型

C# 内置类型

Visual Basic 内置类型

BigInt System.[external link] Int64 long Long
Binary, VarBinary System.[external link] Byte[],或 System.[external link] Guid(如果大小为 16) byte[ ] Byte()
Bit System.[external link] Boolean bool Boolean
Char, VarChar System.[external link] String String String
Date System.[external link] DateTime DateTime(无内置类型) Date
DateTime, TimeStamp System.[external link] DateTime DateTime(无内置类型) Date
Decimal, Numeric System.[external link] String decimal Decimal
Double System.[external link] Double double Double
Float, Real System.[external link] Single float Single
Image System.[external link] Byte[] byte[ ] Byte()
Integer System.[external link] Int32 int Integer
LongBinary System.[external link] Byte[] byte[ ] Byte()
LongNVarChar System.[external link] String String String
LongVarChar System.[external link] String String String
Money System.[external link] String decimal Decimal
NChar System.[external link] String String String
NText System.[external link] String String String
Numeric System.[external link] String decimal Decimal
NVarChar System.[external link] String String String
SmallDateTime System.[external link] DateTime DateTime(无内置类型) Date
SmallInt System.[external link] Int16 short Short
SmallMoney System.[external link] String decimal Decimal
SysName System.[external link] String String String
Text System.[external link] String String String
Time System.[external link] TimeSpan TimeSpan(无内置类型) TimeSpan(无内置类型)
TimeStamp System.[external link] DateTime DateTime(无内置类型) Date
TinyInt System.[external link] Byte byte Byte
UniqueIdentifier System.[external link] Guid Guid(无内置类型) Guid(无内置类型)
UniqueIdentifierStr System.[external link] String String String
UnsignedBigInt System.[external link] UInt64 ulong UInt64(无内置类型)
UnsignedInt System.[external link] UInt32 uint UInt64(无内置类型)
UnsignedSmallInt System.[external link] UInt16 ushort UInt64(无内置类型)
Xml System.[external link] System.Xml String String

长度为 16 的二进制列与 UniqueIdentifier 类型完全兼容。

成员
成员名称 说明

BigInt

有符号 64 位整数。

1

Binary

二进制数据,具有指定的最大长度。枚举值 Binary 和 VarBinary 互为对方的别名。

2

Bit

1 位标志。

3

Char

字符数据,具有指定长度。此类型始终支持 Unicode 字符。类型 Char 与 VarChar 完全兼容。

4

Date

日期信息。

5

DateTime

时间戳信息(日期、时间)。枚举值 DateTime 和 TimeStamp 互为对方的别名。

6

Decimal

精确数字数据,具有指定的精度和小数位数。枚举值 Decimal 和 Numeric 互为对方的别名。

7

Double

双精度浮点数(8 个字节)。

8

Float

单精度浮点数(4 个字节)。枚举值 Float 和 Real 互为对方的别名。

9

Image

存储任意长度的二进制数据。

10

Integer

无符号 32 位整数。

11

LongBinary

二进制数据,具有可变长度。

12

LongNVarchar

NCHAR 字符集中的字符数据,具有可变长度。此类型始终支持 Unicode 字符。

13

LongVarbit

具有可变长度的位数组。

14

LongVarchar

字符数据,具有可变长度。此类型始终支持 Unicode 字符。

15

Money

货币数据。

16

NChar

存储 Unicode 字符数据,最多可存储 8191 个字符。

17

NText

存储任意长度的 Unicode 字符数据。

18

Numeric

精确数字数据,具有指定的精度和小数位数。枚举值 Decimal 和 Numeric 互为对方的别名。

19

NVarChar

存储 Unicode 字符数据,最多可存储 8191 个字符。

20

Real

单精度浮点数(4 个字节)。枚举值 Float 和 Real 互为对方的别名。

21

SmallDateTime

一个域,以 TIMESTAMP 形式实现。

22

SmallInt

有符号 16 位整数。

23

SmallMoney

存储不足一百万货币单位的货币数据。

24

SysName

存储任意长度的字符数据。

25

Text

存储任意长度的字符数据。

26

Time

时间信息。

27

TimeStamp

时间戳信息(日期、时间)。枚举值 DateTime 和 TimeStamp 互为对方的别名。

28

TinyInt

无符号 8 位整数。

29

UniqueIdentifier

通用唯一标识符(Universally Unique Identifier,简称 UUID/GUID)。

30

UniqueIdentifierStr

一个域,以 CHAR(36) 形式实现。UniqueIdentifierStr 用于在映射 Microsoft SQL Server uniqueidentifier 列时进行远程数据访问。

31

UnsignedBigInt

无符号 64 位整数。

32

UnsignedInt

无符号 32 位整数。

33

UnsignedSmallInt

无符号 16 位整数。

34

VarBinary

二进制数据,具有指定的最大长度。枚举值 BinaryVarBinary 互为对方的别名。

35

VarBit

位数组的长度是从 1 到 32767 位之间的值。

36

VarChar

字符数据,具有指定的最大长度。此类型始终支持 Unicode 字符。类型 Char 与 VarChar 完全兼容。

37

Xml

XML 数据。此类型可存储任意长度的字符数据,也用来存储 XML 文档。

38
另请参见