Deleting a Blob

From InterBase

Go Up to Blob Data Operations


There are four ways to delete a Blob:

  • Delete the row containing the Blob. You can use DSQL to execute a DELETE statement.
  • Replace the Blob with a different one. If a Blob column contains a Blob ID, and you modify the column to refer to a different Blob, the Blob referenced by the previously stored Blob ID will be deleted during the next garbage collection.
  • Reset to NULL the column referring to the Blob, for example, by using DSQL to execute a statement like the following:
UPDATE PROJECT SET PROJ_DESC = NULL WHERE PROJ_ID = 'VBASE'
The Blob referenced by the previously stored Blob ID will be deleted during the next garbage collection.
  • Discard a Blob after it has been created but before it has been associated with a particular column of a table row. Use the isc_cancel_blob() function:
isc_cancel_blob(status_vector, &blob_handle);

Advance To: