IsDBHandleField Attribute
Data Type: smallint
4GL Access: RW
Set the IsDBHandleField attribute to TRUE if an expression to be loaded into the target is a string object or bitmap object stored in the database. The Load method uses the value retrieved from the column as a DBHandle.
Setting this attribute to TRUE indicates the following:
• The data in the column is a DBHandle.
• QueyParm's Expression attribute evaluates to a string object or bitmap object.
• During the execution of DataStream's Load method, the data is to be used as a handle rather than directly placed into the target column.
When a DataStream object performs a select operation on a table that contains the IsDBHandleField set to TRUE for a column, before the DataStream object assigns a value to the StringObject.DBHandle or BitmapObject.DBHandle (triggering a select query), the DataStream object first switches to a new database session. The database session is opened when the DataStream object is opened if the DataStream object contains a column for which the IsDBHandleField attribute is set to TRUE.
After switching database sessions, the DataStream object assigns the handle from the database table to the DBHandle attribute. The DataStream object next issues a commit statement for the new database session and finally switches back to the original database session. The database session opened when IsDBHandleField attribute is set to TRUE remains open after the DataStream object returns to the original session, keeping it available for subsequent IsDBHandleField usage.
Assume that a QueryObject object performs an operation that modifies data in a table that contains a column for which the IsDBHandleField attribute is set to TRUE. (That is, the QueryObject object contains a column for which the IsUpdateTarget, IsInsertTarget, or IsDeleteWhere attribute is set to TRUE.) The corresponding operation is also performed on the StringObject or BitmapObject in the same database session.
For example, if the DBDelete method is invoked on the QueryObject object, removing a row from a table that contains a column for which the IsDBHandleField attribute is set to TRUE, the DeleteFromDB method is automatically invoked on the StringObject or BitmapObject.