Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

EVENT_CONDITION_NAME function [System] Next Page

EVENT_PARAMETER function [System]

Provides context information for event handlers.


EVENT_PARAMETER( context-name )

| 'ConnectionID'
| DisconnectReason
| 'EventName'
| 'Executions'
| 'MirrorServerName'
| 'NumActive'
| 'ScheduleName'
| 'TableName'
| 'User'
| condition-name


context-name    One of the preset strings. The strings are case insensitive, and carry the following information:

In addition, you can access any of the valid condition-name arguments to the EVENT_CONDITION function from the EVENT_PARAMETER function.

The following table indicates which context-name values are valid for which system event types.

Context-name value Valid system event types
AppInfo BackupEnd, "Connect", ConnectFailed, "Disconnect", "RAISERROR", user events
ConnectionID BackupEnd, "Connect", "Disconnect", Global Autoincrement, "RAISERROR", user events
DisconnectReason "Disconnect"
EventName all
Executions all
NumActive all
TableName GlobalAutoincrement
User BackupEnd, "Connect", ConnectFailed, "Disconnect", GlobalAutoincrement, "RAISERROR", user events
See also
Standards and compatibility

The following example shows how to pass a string parameter to an event. The event displays the time it was triggered on the server console.

CREATE EVENT ev_PassedParameter
  MESSAGE 'ev_PassedParameter - was triggered at ' || event_parameter( 'time' );
TRIGGER EVENT ev_PassedParameter( "Time"=string(current timestamp ) );