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. 对于 null 值, 返回IsNull属性为 true 的 Sql 类型实例。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.

适用于

另请参阅