Transmitting an Ispec to the Host

Typically a client program uses getFieldValue to copy data values to a form used by the end user and then use setFieldValue to move the updated values back to the Ispec buffer. Once all the new fields have been updated, the Ispec can be sent back to the host application for processing using the Transaction method.

Note: The transaction call is passed a new reference to an Ispec object. This is to allow for the case where the LDL logic branches to a different Ispec. The new Ispec object is created, then you can retrieve the new Ispec object.

The code to transmit the current Ispec to the host application is as follows:

’Create a new Ispec model reference to hold the reply
Set NewIspecRef = mvarConnection.makeIspecModelRef()

’Do the transmit
iResult = mvarConnection.transaction(mvarCurrentIspec, _
                                    NewIspecRef, mvarStatus)
’Check the type of response
If (iResult = 100) or (iResult = 801) then
      ’Get the reply Ispec
      Set mvarCurrentIspec = NewIspecRef.GetObject()
Else
      <Insert error handling code here>

The value of iResult indicates the type of response received from the application. Typical values are shown in the following table:

Value

Description

100

Ispec returned. The name of the new Ispec can be determined using the getName method.

911

One or more application errors returned. This implies that the Ispec failed some form of internal application error checking, and the Ispec has returned errors using the Message command.

801

Both an Ispec and more than one error were returned. This typically happens when you send a warning in the prescreen logic of an Ispec.