Επεξεργασία

Κοινή χρήση μέσω


OracleDataReader.GetValues(Object[]) Method

Definition

Populates an array of objects with the column values of the current row.

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

Parameters

values
Object[]

An array of type Object into which to copy the attribute columns.

Returns

The number of instances of Object in the array.

Implements

Exceptions

The value is too large to be stored in the .NET Decimal.

Remarks

For most applications, the GetValues method provides an efficient means for retrieving all columns, rather than retrieving each column individually.

You can pass an Object array that contains fewer than the number of columns contained in the resulting row. Only the amount of data the Object array holds is copied to the array. You can also pass an Object array whose length is more than the number of columns contained in the resulting row.

This method returns DBNull for null database columns. The value returned in the Object array might be the result of the conversion from Oracle's Number data type to .NET Decimal type. If the value is too large to be stored in the .NET Decimal, this method throws an OracleException that is an overflow exception.

Applies to