Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual NdbBlob::setValue()

Description.  This method is used to prepare for inserting or updating a blob value. Any existing blob data that is longer than the new data is truncated. The data buffer must remain valid until the operation has been executed. setValue() sets the current read/write position to the point following the end of the data. You can set data to a null pointer (0) in order to create a NULL value.


int setValue
      const void*  data,
      Uint32       bytes

Parameters.  This method takes the two parameters listed here:

  • The data that is to be inserted or used to overwrite the blob value.

  • The number of bytes—that is, the length—of the data.

Return value.  0 on success, -1 on failure.