SqlCeParameter.DbType 属性
获取或设置参数的 DbType。
命名空间: System.Data.SqlServerCe
程序集: System.Data.SqlServerCe(在 system.data.sqlserverce.dll 中)
语法
声明
Public Overrides Property DbType As DbType
用法
Dim instance As SqlCeParameter
Dim value As DbType
value = instance.DbType
instance.DbType = value
public override DbType DbType { get; set; }
public:
virtual property DbType DbType {
DbType get () override;
void set (DbType value) override;
}
/** @property */
public DbType get_DbType ()
/** @property */
public void set_DbType (DbType value)
public override function get DbType () : DbType
public override function set DbType (value : DbType)
不适用。
属性值
DbType 值之一。默认为 String。
异常
异常类型 | 条件 |
---|---|
该属性未设置为有效的 DbType。 |
备注
SqlDbType 和 DbType 是链接的。因此,设置 DbType 会将 SqlDbType 更改为支持 SqlDbType。
SQL Server Compact Edition .NET 提供程序支持下面的 DbType 值:
String
示例
下面的示例创建 SqlCeParameter 并设置 DbType 属性。
Dim param As New SqlCeParameter()
param.DbType = DbType.String
SqlCeParameter param = new SqlCeParameter();
param.DbType = DbType.String;
平台
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 命名空间
SqlCeType