HP-UX AAA Server A.08.02 Administrator's Guide

DELETE FROM RAD_SESS_TABLE
WHERE session_id=sessid
}
}
}
SQL Result Mapping
The SQL Access AATV does not check the result of the SQL statement execution. However, if you
want to have control over the actions based on the SQL statement result, use the DBR (result)
mapping and a pre-defined or custom mapping function to set an event based on the SQL statement
return values or uses the newly added feature with syntax, DBR (return code:error code)
mapping along with RET (return event), which offers more customization without writing a
mapping function. You can use SQL result mapping anywhere in your input or output maps, it will
operate on the return code from the last SQL statement executed prior to the SQL result mapping
entry.
The sample implementation tests for successful SQL statement execution for all SQL actions using
the mapping function AckonZero except in the RetrieveUser action, which uses the
RetrieveonZero mapping function to set the event code. See “Mapping Functions” (page 262)
for more information on pre-defined mapping functions to set event codes. For more information
on event code handling for user retrieval action, see “Result Handling for Retrieval Requests
(page 267) in this section.
If your mapping function returns an event other than ACK, control is returned to the FSM immediately
with the event code set in the mapping function.
The syntax for SQL result mapping can be one of the following:
DBR (result) FUNC (mappingfunction)
Where result can take one of the following values:
DBMatchRow Returns the number of matched rows. This is useful if your database returns
a SQL result code of 0 (success) even if the number of retrieved rows is zero.
With a custom defined mapping function you can then overwrite the event
code handling and return event codes other than ACK to the FSM.
DBRetCode Returns the SQL result from the SQL statement as defined by the database
client library. HP provides the following pre-defined mapping functions useful
with a DBR mapping:
ACKonAll
ACKonZero
NAKonZero
RETRIEVEonZero
See “Mapping Functions” (page 249) for more information on the event
handling functions.
DBR (return code:error code) RET (return event)
Where values are described as follows:
return code Integer return value from ODBC or OCI APIs. For example, 0 or 100. The
following table describes the different return values for OCI and ODBC:
266 SQL Access