AdsDataReader.GetChars

Advantage .NET Data Provider

  Previous topic Next topic  

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

public long GetChars

(

int iCol, // (I) 0-based column index

long lFieldOffset, // (I) offset to start reading from

char[] buffer, // (O) output buffer

int iBufferOffset,// (I) starting offset in output buffer

int iLength // (I) number of bytes to read

);

Return Value

The actual number of characters read.

Remarks

If you pass a buffer that is a null reference (Nothing in Visual Basic), GetChars returns the length of the field in characters.

No conversions are performed; therefore the data retrieved must already be a character array (memo or string field). This method cannot be used to retrieve null values. Call AdsDataReader.IsDBNull to check for null values before calling this method.

Note This method is not affected by the TrimTrailingSpaces option (see AdsConnection.ConnectionString).

See Also

GetValue

IsDBNull