HP-UX AAA Server A.08.01 administrator's guide (T1428-90072, May 2010)

Table Of Contents
For ODBC:
SQLAction StopSession {
{
input
RAD(Class) DBP(1, 254, CHAR)
output
DBR(-1:*) RET(ERROR)
DBR(0:0) RET(ACK)
DBR(*:*) RET(NAK)
SQLStatement db_odbc {
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 359) 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 366) 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.
364 SQL Access