CRField::getWChars
Previous  Index  Next

const wchar_t* getWChars();
wchar_t* getWChars(wchar_t* result);
wchar_t* getWChars(wchar_t* result, int length);

Return Value

Zero-terminated Unicode string of chars.

Parameters

result
Buffer to hold copy of the field value.  
length
Number of characters to be copied.  

Description

Call this member function to retrieve field data in the current record represented as a Unicode string. For the function that does not have length parameter result parameter represents a buffer long enough to hold zero-terminated copy of the field value. For getChars function with length parameter, if length is less than or equal to the length of result, a null character is not appended automatically to the copied string. If length is greater than the length of result, the destination string is padded with null characters up to length value. Throws an exception when type conversion is not possible. Use this function for connections in Unicode mode only.

Example

  wchar_t* dName;
  
wchar_t buffer[100];

  dName = dataset.field("DName").getWChars();
  dataset.field("DName").getWChars(buffer);

See Also

CRField::setWString, CRField::setWChars


CRField | Classes | OCL | Index