SqlDataReader.GetSqlValues(Object[]) 方法
定义
public:
virtual int GetSqlValues(cli::array <System::Object ^> ^ values);
public:
int GetSqlValues(cli::array <System::Object ^> ^ values);
public virtual int GetSqlValues (object[] values);
public int GetSqlValues (object[] values);
abstract member GetSqlValues : obj[] -> int
override this.GetSqlValues : obj[] -> int
member this.GetSqlValues : obj[] -> int
Public Overridable Function GetSqlValues (values As Object()) As Integer
Public Function GetSqlValues (values As Object()) As Integer
参数
- values
- Object[]
要将值复制到其中的 Object 数组。An array of Object into which to copy the values. 这些列值表示为 SQL Server 类型。The column values are expressed as SQL Server types.
返回
表示复制的列数的整数。An integer indicating the number of columns copied.
例外
values 为 null。values is null.
注解
使用 SQL 类型系统而不是 CLR 类型系统,返回记录中所有列的值。Returns the values for all the columns in the record in a single call, using the SQL type system instead of the CLR type system. 数组的长度 Object 不需要与记录中的列数匹配。The length of the Object array does not need to match the number of columns in the record. 可以传递一个 Object 数组,该数组包含的列数少于记录中包含的列数。You can pass an Object array that contains fewer than the number of columns contained in the record. 只有数组保存的数据量 Object 会被复制到数组,从序号为0的列开始。Only the amount of data the Object array holds is copied to the array, starting at the column with ordinal 0. 还可以传递 Object 其长度大于结果行中所含列数的数组。You can also pass an Object array whose length is more than the number of columns contained in the resulting row. 其余所有列都不会。Any remaining columns are untouched.