OdbcDataReader.GetChars(Int32, Int64, Char[], Int32, Int32) 메서드

정의

특정 버퍼 오프셋에서 시작하여 지정된 열 오프셋에서 버퍼로 문자 스트림을 배열로 읽습니다.

public:
 virtual long GetChars(int i, long dataIndex, cli::array <char> ^ buffer, int bufferIndex, int length);
public:
 override long GetChars(int i, long dataIndex, cli::array <char> ^ buffer, int bufferIndex, int length);
public long GetChars(int i, long dataIndex, char[] buffer, int bufferIndex, int length);
public override long GetChars(int i, long dataIndex, char[] buffer, int bufferIndex, int length);
abstract member GetChars : int * int64 * char[] * int * int -> int64
override this.GetChars : int * int64 * char[] * int * int -> int64
override this.GetChars : int * int64 * char[] * int * int -> int64
Public Function GetChars (i As Integer, dataIndex As Long, buffer As Char(), bufferIndex As Integer, length As Integer) As Long
Public Overrides Function GetChars (i As Integer, dataIndex As Long, buffer As Char(), bufferIndex As Integer, length As Integer) As Long

매개 변수

i
Int32

0부터 시작하는 열 서수입니다.

dataIndex
Int64

읽기 작업을 시작할 행 내의 인덱스입니다.

buffer
Char[]

데이터를 복사할 버퍼입니다.

bufferIndex
Int32

쓰기 작업을 시작할 위치 내 buffer 의 인덱스입니다.

length
Int32

읽을 문자 수입니다.

반품

읽은 실제 문자 수입니다.

구현

설명

GetChars 는 필드에서 사용 가능한 문자 수를 반환합니다. 대부분의 경우 필드의 정확한 길이입니다. 그러나 반환된 숫자는 필드에서 문자를 가져오는 데 이미 사용된 경우 GetChars 필드의 실제 길이보다 작을 수 있습니다. 예를 들어 큰 데이터 구조를 버퍼로 읽는 경우 OdbcDataReader 일 수 있습니다. 자세한 내용은 에 SequentialAccess 대한 CommandBehavior설정을 참조하세요.

null 값 GetChars 인 버퍼를 전달하면 필드 길이가 문자로 반환됩니다.

변환은 ODBC 드라이버의 기본 기능에 따라 수행됩니다. 변환이 지원되지 않으면 메서드 호출이 실패합니다.

Note

bufferIndex 이 배열 외부에 있으면 예외가 throw되지 않습니다. 데이터를 읽지 않고 메서드가 0을 반환합니다.

적용 대상

추가 정보