Поделиться через


Метод AdomdDataReader.GetChars

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

Пространство имен:  Microsoft.AnalysisServices.AdomdServer
Сборка:  msmgdsrv (в msmgdsrv.dll)

Синтаксис

'Декларация
Public Function GetChars ( _
    i As Integer, _
    fieldOffset As Long, _
    buffer As Char(), _
    bufferoffset As Integer, _
    length As Integer _
) As Long
'Применение
Dim instance As AdomdDataReader 
Dim i As Integer 
Dim fieldOffset As Long 
Dim buffer As Char()
Dim bufferoffset As Integer 
Dim length As Integer 
Dim returnValue As Long 

returnValue = instance.GetChars(i, fieldOffset, _
    buffer, bufferoffset, length)
public long GetChars(
    int i,
    long fieldOffset,
    char[] buffer,
    int bufferoffset,
    int length
)
public:
virtual long long GetChars(
    int i, 
    long long fieldOffset, 
    array<wchar_t>^ buffer, 
    int bufferoffset, 
    int length
) sealed
abstract GetChars : 
        i:int * 
        fieldOffset:int64 * 
        buffer:char[] * 
        bufferoffset:int * 
        length:int -> int64  
override GetChars : 
        i:int * 
        fieldOffset:int64 * 
        buffer:char[] * 
        bufferoffset:int * 
        length:int -> int64
public final function GetChars(
    i : int, 
    fieldOffset : long, 
    buffer : char[], 
    bufferoffset : int, 
    length : int
) : long

Параметры

  • i
    Тип: System.Int32
    The zero-based ordinal position of the column to be retrieved.
  • fieldOffset
    Тип: System.Int64
    The zero-based index within the column from which to begin reading data.
  • buffer
    Тип: array<System.Char[]
    The buffer into which to read the stream of characters.
  • bufferoffset
    Тип: System.Int32
    The zero-based index within the buffer from which to begin writing data.
  • length
    Тип: System.Int32
    The number of characters to read from the column.

Возвращаемое значение

Тип: System.Int64
A Long that contains the number of characters actually read from the column.

Реализует

IDataRecord.GetChars(Int32, Int64, array<Char[], Int32, Int32)

Исключения

Исключение Условие
[IndexOutOfRangeException]

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.

For more information about this exception, see IndexOutOfRangeException Class.

Замечания

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 Microsoft 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.

См. также

Справочник

AdomdDataReader Класс

Пространство имен Microsoft.AnalysisServices.AdomdServer