Contents Index GET DESCRIPTOR statement [ESQL] GOTO statement [T-SQL]

ASA SQL Reference
  SQL Statements

GET OPTION statement [ESQL]


Description 

You can use this statement to get the current setting of an option. It is recommended that you use the connection_property function instead.

Syntax 

GET OPTION [ userid.]option-name
INTO hostvar ]
USING DESCRIPTOR sqlda-name ]

userid :     identifierstring, or hostvar

option-name :  identifierstring, or hostvar

hostvar :    indicator variable allowed

sqlda-name :   identifier

Usage 

The GET OPTION statement is provided for compatibility with older versions of the software. The recommended way to get the values of options is to use the connection_property system function.

The GET OPTION statement gets the option setting of the option option-name for the user userid or for the connected user if userid is not specified. This will be either the user's personal setting or the PUBLIC setting if there is no setting for the connected user. If the option specified is a database option and the user has a temporary setting for that option, then the temporary setting is retrieved.

If option-name does not exist, GET OPTION returns the warning SQLE_NOTFOUND.

Permissions 

None required.

Side effects 

None.

See also 

SET OPTION statement

System and catalog stored procedures

CONNECTION_PROPERTY function [System]

Standards and compatibility 
Example 

The following statement illustrates use of GET OPTION.

EXEC SQL GET OPTION 'date_format' INTO :datefmt;

Contents Index GET DESCRIPTOR statement [ESQL] GOTO statement [T-SQL]