ctsqlGetChar
Retrieve character data.
Declaration
CTSQLRET ctsqlDECL ctsqlGetChar(pCTSQLCURSOR hCursor, INTEGER colnumber, char* buffer);
Description
ctsqlGetChar() retrieves character data from the given cursor and column.
Note: The buffer must be at least 1 character larger than the maximum field size, because the character data is returned with an additional NULL terminator. ctsqlGetColumnLength() can be used to get the column length in bytes.
Return
ctsqlGetChar() returns CTSQLRET_OK on success.
Prior to V12, a call to this function, or similar ctsqlGet*() functions for other data types, would fail with SQL_ERR_BADARG if the column value was a SQL NULL. These functions now return CTSQL_NULLRESULT if the data value is a SQL NULL. This change does not apply to ctsqlGetBinary or ctsqlGetBlob. Note: This modification is a Compatibility Change.
Symbolic Constant |
Explanation |
SQL_ERR_BADARG |
Bad arguments |
Note:
DSQL no longer allows using ctsqlGetChar() to retrieve long variable columns
See Also
ctsqlGetBytes(), ctsqlGetNumeric(), ctsqlGetSmallInt(), ctsqlGetInteger(), ctsqlGetReal(), ctsqlGetFloat(), ctsqlGetDate(), ctsqlGetMoney(), ctsqlGetTime(), ctsqlGetTimeStamp(), ctsqlGetTinyInt(), ctsqlGetBinary(), ctsqlGetBit(), ctsqlGetBigInt(), ctsqlGetBlob()