Lists all the attributes of all the contexts in the current session.
list_appcontext ("context_name")
context_name – names all the application context attributes in the session. list_appcontext has a datatype of char(30).
Example 1 Shows the results of a user with appropriate permissions listing the application contexts:
select list_appcontext ("*", "*") Context Name: (CONTEXT1) Attribute Name: (ATTR1) Value: (VALUE2) Context Name: (CONTEXT2) Attribute Name: (ATTR1) Value: (VALUE!)
----------- 0
Example 2 Shows a user without appropriate permissions attempting to list the application contexts. The attempt fails, returning -1.
select list_appcontext() Select permission denied on built-in list_appcontext, database DBID
--------- -1
list_appcontext returns 0 for success and -1 for failure.
Since built-in functions do not return multiple result sets, the client application receives list_appcontext returns as messages.
To use list_appcontext, the user must have appropriate permissions. For more information, see “Setting permissions for using application context functions”.