Product Documentation

FairCom Direct SQL for C and C++

Previous Topic

Next Topic

ctsqlGetBytes

Retrieve a binary field.

Declaration

INTEGER ctsqlGetBytes(pCTSQLCURSOR hCursor, INTEGER colnumber, UTINYINT buffer[], INTEGER size)

Description

ctsqlGetBinary() retrieves the value of a binary field, given its cursor and column. A binary field is an array of bytes.

  • hCursor [IN] - the cursor handle.
  • colnumber [IN] - the number of columns.
  • buffer [OUT] - the buffer to receive the field data.
  • size [IN] - number of bytes in buffer.

Return

Return -1 on error, otherwise the number of bytes actually read or negative on error. Use ctsqlGetError to get the error code:

Symbolic Constant

Explanation

SQL_ERR_BADARG

Bad arguments

See Also

ctsqlGetBinary(), ctsqlGetNChar(), ctsqlGetNumeric(), ctsqlGetSmallInt(), ctsqlGetInteger(), ctsqlGetReal(), ctsqlGetFloat(), ctsqlGetDate(), ctsqlGetMoney(), ctsqlGetTime(), ctsqlGetTimeStamp(), ctsqlGetTinyInt(), ctsqlGetBit(), ctsqlGetBigInt(), ctsqlGetBlob(), ctsqlGetError

TOCIndex