Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlConvert

Converts data from one type representation to the desired type representation.

Declaration

CTSQLRET ctsqlConvert(CTSQLTYPE stype, void* buffer1, INTEGER length1, CTSQLCHAR* fmt, CTSQLTYPE dtype, void* buffer2, INTEGER length2)

Description

ctsqlConvert() converts data from one given representation to a new type representation.

  • stype The data type of the source buffer which is being converted.
  • buffer1 The buffer containing the source data
  • length1 Length in bytes of data in source buffer
  • fmt format string to be used for formatting the output if the desired destination data is a character string type. Currently a format string can be specified only if the input is of type TPE_DT_DATE and the output is of type TPE_DT_CHAR.
  • dtype The data type of the destination buffer
  • buffer2 The buffer to receive the converted data
  • length2 Length in bytes of the destination buffer

Return

ctsqlConvert() returns CTSQLRET_OK on success.

TOCIndex