SE_stream_get_blob |
Gets a Binary Large Object (BLOB) column from the current row
LONG SE_stream_get_blob
(SE_STREAM stream,
SHORT column,
SE_BLOB_INFO *blob_val);
stream | The stream handle |
column | The column number for the blob; columns numbers start with the number 1. |
blob_val | The returned blob |
SE_stream_get_blob extracts the data from a blob column from the current record on the specified stream. Information necessary to access the blob data is returned in the SE_BLOB_INFO structure:
typedef struct {
LONG blob_length; /* Length in bytes of the BLOB */
CHAR *blob_buffer; /* Linear buffer of BLOB data */
} SE_BLOB_INFO
SE_stream_get_blob sets the blob_length field of the SE_BLOB_INFO structure upon successful return.
Due to the potentially large size of BLOBs, the ArcSDE client does not locally cache the BLOB. Therefore, SE_stream_get_blob may be called only once per BLOB column for a given row. If a second call is made for the same column before making another call to SE_stream_fetch, SE_stream_get_blob returns the error SE_FUNCTION_SEQUENCE_ERROR.
If there is no data for the specified column, the function returns the warning SE_NULL_VALUE.
When fetching BLOB columns, the application may set the BLOB buffer pointer (of the SE_BLOB_INFO structure) to NULL. In this case, SE_stream_get_blob allocates sufficient memory for the fetched BLOB. It is the applications responsibility to free the memory using SE_blob_free. If the blob_buffer pointer is not null when SE_stream_get_blob is called, ArcSDE assumes that the application has already allocated sufficient memory and writes the entire BLOB into the blob_buffer pointer.
SE_SUCCESS
SE_CONNECTION_IN_USE
SE_CONNECTION_LOCKED
SE_DB_IO_ERROR
SE_FUNCTION_SEQUENCE_ERROR
SE_INVALID_PARAM_VALUE
SE_INVALID_POINTER
SE_INVALID_STREAM
SE_NET_FAILURE
SE_NULL_VALUE
SE_OUT_OF_CLMEM
SE_SDE_NOT_STARTED
SE_WRONG_COLUMN_TYPE