UpdateInDB Method
The UpdateInDB method replaces a bitmap in the database.
This method has the following syntax:
integer = BitmapObject.UpdateInDB()
The DBHandle to be used in the update is taken from the current DBHandle attribute setting.
This method does its work in two steps:
1. It deletes from the database the bitmap data specified by the DBHandle attribute.
2. It saves the current contents of the BitmapObject to the database using the same DBHandle.
Because the UpdateInDB method interacts directly with the database, the method participates in transactions. It either initiates a transaction or becomes part of any ongoing transaction. The work that it does is not permanent until a commit statement executes to commit the transaction. By default, you must issue a commit statement explicitly.
For more information about transaction management and this method, see the Programming Guide.
This method returns ER_OK if successful, or a non-zero database error code if not. Descriptions of system constant values and their numeric equivalents are listed in
Error Codes.
Note: Do not use this method with autocommit turned on, because the multiple database statements involved in saving a bitmap object can result in incorrect values.