This documentation is archived and is not being maintained.

IDataRecord.GetValues Method

Gets all the attribute fields in the collection for the current record.

[Visual Basic]
Function GetValues( _
   ByVal values() As Object _
) As Integer
[C#]
int GetValues(
   object[] values
);
[C++]
int GetValues(
   Object* values __gc[]
);
[JScript]
function GetValues(
   values : Object[]
) : int;

Parameters

values
An array of Object to copy the attribute fields into.

Return Value

The number of instances of Object in the array.

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

IDataRecord Interface | IDataRecord Members | System.Data Namespace

Show: