SqlCeCommand.UpdatedRowSource 属性

获取或设置当 DbDataAdapterUpdate 方法使用命令结果时将命令结果应用于 DataRow 的方式。此属性不应与 SQL Server Compact 的 .NET Compact Framework 数据提供程序一起使用。

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

语法

声明
Public Overrides Property UpdatedRowSource As UpdateRowSource
    Get
    Set
用法
Dim instance As SqlCeCommand
Dim value As UpdateRowSource

value = instance.UpdatedRowSource

instance.UpdatedRowSource = value
public override UpdateRowSource UpdatedRowSource { get; set; }
public:
virtual property UpdateRowSource UpdatedRowSource {
    UpdateRowSource get () override;
    void set (UpdateRowSource value) override;
}
abstract UpdatedRowSource : UpdateRowSource with get, set
override UpdatedRowSource : UpdateRowSource with get, set
override function get UpdatedRowSource () : UpdateRowSource
override function set UpdatedRowSource (value : UpdateRowSource)

属性值

类型:System.Data.UpdateRowSource
UpdateRowSource 值之一。默认值为 Both。如果命令是自动生成的,则默认值为 None。

实现

IDbCommand.UpdatedRowSource

异常

异常 条件
ArgumentException

输入的值不是某一 UpdateRowSource 值。

示例

Dim cmd As SqlCeCommand = conn.CreateCommand()
cmd.CommandText = "SELECT * FROM Categories ORDER BY CategoryID"
cmd.CommandType = CommandType.Text
cmd.UpdatedRowSource = UpdateRowSource.Both
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Categories ORDER BY CategoryID";
cmd.CommandType = CommandType.Text;
cmd.UpdatedRowSource = UpdateRowSource.Both;

请参阅

参考

SqlCeCommand 类

System.Data.SqlServerCe 命名空间