Export (0) Print
Expand All

AdomdDataReader.GetChars Method

Returns an array of Char objects that contain a stream of values from the specified column.

Namespace:  Microsoft.AnalysisServices.AdomdClient
Assembly:  Microsoft.AnalysisServices.AdomdClient (in Microsoft.AnalysisServices.AdomdClient.dll)

public long GetChars(
	int ordinal,
	long dataIndex,
	char[] buffer,
	int bufferIndex,
	int length


Type: Int32
The zero-based ordinal position of the column to be retrieved.
Type: Int64
The zero-based index within the column from which to begin reading data.
Type: Char[]
The buffer into which to read the stream of characters.
Type: Int32
The zero-based index within the buffer from which to begin writing data.
Type: Int32
The number of characters to read from the column.

Return Value

Type: Int64
A Long that contains the number of characters actually read from the column.


IDataRecord.GetChars(Int32, Int64, Char, Int32, Int32)


The value ofdataIndex is greater than Int32.MaxValue.

The value of bufferIndex is less than 0 or greater than the total of length and the length of buffer.

The GetChars method returns the number of available characters in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetChars has already been used to obtain characters from the field.

If you pass a null reference (Nothing in Visual Basic) in the buffer parameter, GetBytes returns the length of the column in characters.

No conversions are performed; therefore the data retrieved must already be a character array.

Community Additions

© 2015 Microsoft