Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlCompare

Compares two data objects of a given field type.

Declaration

CTSQLRET ctsqlCompare(CTSQLTYPE dtype, void* buffer1, INTEGER length1, void* buffer2, INTEGER length2, INTEGER* result)

Description

ctsqlCompare() compares two data objects of a given field type.

  • dtype the data type of the two objects that are being compared
  • buffer1 the buffer containing the first object to be compared
  • length1 the length in bytes of the first data object
  • buffer2 the buffer containing the second object to be compared
  • length2 the length in bytes of the second data object
  • result receives the result of the comparison. A negative value indicates first object is less than second object. A positive value indicates first object is greater than second object. A zero indicates both objects are equal.

Return

ctsqlCompare() returns CTSQLRET_OK on success.

TOCIndex