SqlDataRecord.GetSqlValues(Object[]) SqlDataRecord.GetSqlValues(Object[]) SqlDataRecord.GetSqlValues(Object[]) SqlDataRecord.GetSqlValues(Object[]) Method

定义

返回记录中所有列的值,这些值在数组中表示为 SQL Server 类型。Returns the values for all the columns in the record, expressed as SQL Server types, in an array.

public:
 virtual int GetSqlValues(cli::array <System::Object ^> ^ values);
public virtual int GetSqlValues (object[] values);
abstract member GetSqlValues : obj[] -> int
override this.GetSqlValues : obj[] -> int
Public Overridable Function GetSqlValues (values As Object()) As Integer

参数

values
Object[]

要将值列值复制到其中的数组。The array into which to copy the values column values.

返回

指示复制的列数的 Int32An Int32 that indicates the number of columns copied.

异常

注解

SQL Server 类型值的列复制到values作为参数传递的数组。The SQL Server type values of the column are copied into the values array that is passed as a parameter. Sql 类型实例为 null 值,并返回 whereIsNull属性为 true。For null values, a Sql type instance is returned where the IsNull property is true.

长度values数组不需要以匹配的记录中的列数。The length of the values array does not need to match the number of columns in the record. 如果数组长度大于列数,所有的列的值复制到数组中;如果它小于,只有数组长度数量的列的值复制到起始位置与序号 0 列的值的数组。If the array length is greater than the number of columns, all of the column values are copied into the array; if it is less, only the array length number of column values are copied into the array, starting at the column value with ordinal 0.

适用于

另请参阅