SqlCeParameter.SqlDbType 属性

获取或设置参数的 SqlDbType

命名空间: System.Data.SqlServerCe
程序集: System.Data.SqlServerCe(在 system.data.sqlserverce.dll 中)

语法

声明
Public Property SqlDbType As SqlDbType
用法
Dim instance As SqlCeParameter
Dim value As SqlDbType

value = instance.SqlDbType

instance.SqlDbType = value
public SqlDbType SqlDbType { get; set; }
public:
property SqlDbType SqlDbType {
    SqlDbType get ();
    void set (SqlDbType value);
}
/** @property */
public SqlDbType get_SqlDbType ()

/** @property */
public void set_SqlDbType (SqlDbType value)
public function get SqlDbType () : SqlDbType

public function set SqlDbType (value : SqlDbType)
不适用。

属性值

SqlDbType 值之一。默认为 NVarChar

备注

SqlDbTypeDbType 是链接的。因此,设置 DbType 会将 SqlDbType 更改为支持 SqlDbType

SQL Server Compact Edition .NET 提供程序支持下面的 SqlDbType:

  • SqlDbType.TinyInt

  • SqlDbType.SmallInt

  • SqlDbType.Int

  • SqlDbType.BigInt

  • SqlDbType.Real

  • SqlDbType.Float

  • SqlDbType.Money

  • SqlDbType.Bit

  • SqlDbType.Binary

  • SqlDbType.VarBinary

  • SqlDbType.UniqueIdentifier

  • SqlDbType.Image

  • SqlDbType.NText

  • SqlDbType.NChar

  • SqlDbType.NVarChar

  • SqlDbType.Decimal

  • SqlDbType.DateTime

有关受支持的数据类型的列表,请参见适当的 DbType 属性。

示例

下面的示例创建 SqlCeParameter 并设置 SqlDbType 属性。

Dim param As New SqlCeParameter()
param.SqlDbType = SqlDbType.NText
SqlCeParameter param = new SqlCeParameter();
param.SqlDbType = SqlDbType.NText;

平台

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Windows Vista、Microsoft Windows XP SP2 和 Windows Server 2003 SP1 支持 Microsoft .NET Framework 3.0。

版本信息

.NET Framework

受以下版本支持:3.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

SqlCeParameter 类
SqlCeParameter 成员
System.Data.SqlServerCe 命名空间