SqlDataSourceView.Insert(IDictionary) 方法

定义

使用 InsertCommand SQL 字符串、集合中指定的 InsertParameters 任何参数以及指定 values 集合中的值执行插入操作。

public:
 int Insert(System::Collections::IDictionary ^ values);
public int Insert(System.Collections.IDictionary values);
override this.Insert : System.Collections.IDictionary -> int
Public Function Insert (values As IDictionary) As Integer

参数

values
IDictionary

IDictionary要用于执行插入数据库操作的属性的参数InsertCommand。 如果没有与查询关联的参数,或者 InsertCommand 不是参数化 SQL 查询,则传递 null

返回

一个值,表示插入到基础数据库中的行数。

例外

无法 SqlDataSource 与基础数据源建立连接。

属性 CanInsertfalse.

注解

该方法 Insert 调用该方法 ExecuteInsert ,传递 values 参数。

适用于

另请参阅