ctdbSetFieldBinaryFlag
Set extra field information on how the binary content of the field needs to be handled. FairCom DB API has specific behaviors for CT_ARRAY, CT_2STRING, and CT_NUMBER.
Alternate name for this function: ctdbSetBinaryFlag().
Note: ctdbSetBinaryFlag() requires a field number parameter, which is not required by ctdbSetFieldBinaryFlag():
CTDBRET ctdbDECL ctdbSetBinaryFlag(CTHANDLE Handle, NINT fldno, CTDB_BINARY_FLAG flag);
Declaration
CTDBRET ctdbSetFieldBinaryFlag(CTHANDLE Handle, CTDB_BINARY_FLAG flag)
Parameters:
CTDB_BINARY_UNKNOWN - (CT_ARRAY or CT_2STRING fields) Table created by FairCom DB API prior to V9. Indicates that the field may or may not have an extra 4 bytes at the beginning of data.
CTDB_BINARY_FIXED - (CT_ARRAY or CT_2STRING fields) Table created by FairCom DB API V9 or later, so CT_ARRAY and CT_2STRING fields are handled correctly.
CTDB_BINARY_WITH_LENGTH - (CT_ARRAY or CT_2STRING fields) Table was created prior to V9 and only FairCom DB SQL has operated on it, so the CT_ARRAY and CT_2STRING fields have four bytes at the beginning of the data. This flag was most likely updated by a utility.
CTDB_BINARY_WITHOUT_LENGTH - (CT_ARRAY or CT_2STRING fields) Table created by FairCom DB API prior to V9. A utility has updated this resource.
CTDB_BINARY_VARCHAR - (CT_2STRING) Fields created by FairCom DB SQL V10 and later. This field content is interpreted by SQL as a VARCHAR.
CTDB_NUMBER_MONEY - (CT_NUMBER field) This field is interpreted by SQL as a MONEY type.
CTDB_BINARY_CLOB and CTDB_BINARY_BLOB - (CLOB and BLOB fields in V10 and later) - Reserved for future use.
CTDB_FIELDFLAG_USER1 - CTDB_FIELDFLAG_USER10 (V11.5 and later) - (All field types) These values can be used on any field type to carry information that can be used by the programmer to determine a different handling of the field content. For example, when using the FairCom DB API Type SDK (callbacks), these flags can be used to signal fields that need to be converted from a proprietary type to a c-tree defined type so they can be properly handled by FairCom DB API/SQL.
Return Values
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
CTDBRET_OK |
Successful operation. |
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.
See Also