Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTRecord::SetFieldAsUTF16

Sets the field with a Unicode UTF-16 string.

Declaration

void CTRecord::SetFieldAsUTF16(NINT FieldNumber, pWCHAR value);

Description

  • FieldNumber is a number representing the field number.
  • value is the wide (UTF-16) string buffer.

SetFieldAsUTF16() sets the field with a UNICODE UTF-16 string. If the underlying field type is not one of the UNICODE field types, the UTF-16 string is converted to the appropriate type before the data is stores in the field.

Return

void

Example


void AddData(CTRecord& hRecord, const CTString& str, NINT val)

{

WCHAR WStr[32];

hRecord.Clear();

ctdb_u8TOu16(str, WStr, sizeof(WStr));

hRecord.SetFieldAsUTF16(0, WStr);

hRecord.SetFieldAsSigned(1, (CTSIGNED)val);

hRecord.Write();

}

TOCIndex