BBjTriggerData::setExpectedDiskData

Description

In BBj 6.00 and higher, and in an Update Trigger, this method sets the expected record value currently on disk before the update occurs. The expected disk data must match the actual data on disk or an error is generated when the file system attempts to update the record on disk.

This value is ignored for Triggers fired by a WRITE RECORD call in the language. The value is only relevant during SQL UPDATE statements and calls to the update() methods on JLIB FilePosition instances.

Syntax

Return Value

Method

void

setExpectedDiskData(byte[] data)

Parameters

Variable

Description

data

Expected data on disk.

Return Value

None.

Remarks

If using the setReadBuffer() method, it is likely the developer will need a setExpectedDiskData() in the update to restore the "Expected Data" to its original state.

Example

rem 'Get the Trigger object from the BBj File System

td! = BBjAPI().getFileSystem().getTriggerData()

rem 'set the expected disk data to be "Donkey"
td!.setExpectedDiskData("DONKEY")

See Also

BBjAPI

BBjTriggerData

ObjectVariables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.