SqlCeDataAdapter 构造函数 (SqlCeCommand)

初始化 SqlCeDataAdapter 类的新实例,用指定的 SqlCeCommand 作为 SelectCommand 的属性。

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

语法

声明
Public Sub New ( _
    selectCommand As SqlCeCommand _
)
用法
Dim selectCommand As SqlCeCommand

Dim instance As New SqlCeDataAdapter(selectCommand)
public SqlCeDataAdapter (
    SqlCeCommand selectCommand
)
public:
SqlCeDataAdapter (
    SqlCeCommand^ selectCommand
)
public SqlCeDataAdapter (
    SqlCeCommand selectCommand
)
public function SqlCeDataAdapter (
    selectCommand : SqlCeCommand
)
不适用。

参数

备注

此版本的构造函数将 SelectCommand 属性设置为在 selectCommand 参数中指定的值。

当创建 SqlCeDataAdapter 的实例时,下面的读/写属性将设置为以下初始值。

属性

初始值

MissingMappingAction

MissingMappingAction.Passthrough

MissingSchemaAction

MissingSchemaAction.Add

可以通过单独调用这些属性中某个属性来更改该属性的值。

示例

下面的示例通过传入一个 SqlCeCommand 对象创建了一个 SqlCeDataAdapter

平台

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

请参见

参考

SqlCeDataAdapter 类
SqlCeDataAdapter 成员
System.Data.SqlServerCe 命名空间
MissingMappingAction
MissingSchemaAction