PostgreSQLDatabase.DeleteLargeObject

From Xojo Documentation

Method

PostgreSQLDatabase.DeleteLargeObject(oid As Integer)

Supported for all project types and targets.

Deletes the large object identified by oid.

Notes

PostgreSQL requires that all large object operations be performed inside of a transaction. Therefore, you must start a transaction before you perform your first large object operation:

db.ExecuteSQL("BEGIN TRANSACTION")

After you have performed your last large object operation, you should close the transaction, like this:

db.ExecuteSQL("END TRANSACTION")

Please see the PostgreSQLLargeObject class for information on how to work with large objects.

Example

Delete a large object:

// db is a previously connected PostgreSQLDatabase
// objectID is a reference to a previously created large object
Try
db.DeleteLargeObject(objectID)
Catch error As DatabaseException
MessageBox("DB Error: " + error.Message)
End Try