Table 2-21 describes the options a client may set, retrieve, or clear, and each option’s default value.
Symbolic constant |
What the option does |
Default value |
---|---|---|
CS_OPT_ANSINULL |
If this option is set to CS_TRUE, Adaptive Server enforces the ANSI behavior that “=NULL” and “is NULL” are not equivalent. In standard Transact SQL, “=NULL” and “is NULL” are treated as equivalent. This option affects “<> NULL” and “is not NULL” behavior in a similar fashion. |
CS_FALSE |
CS_OPT_ANSIPERM |
If this option is set to CS_TRUE, Adaptive Server will be ANSI compliant in its permission checks on update and delete statements. |
CS_FALSE |
CS_OPT_ARITHABORT |
If this option is set to CS_TRUE, Adaptive Server aborts a query when an arithmetic exception occurs during its execution. |
CS_FALSE |
CS_OPT_ARITHIGNORE |
If this option is set, Adaptive Server substitutes NULL for selected or updated values when an arithmetic exception occurs during query execution. Adaptive Server does not return a warning message. If neither CS_OPT_ARITHABORT nor CS_OPT_ARITHIGNORE is set, Adaptive Server substitutes NULL and prints a warning message after the query has been executed. |
CS_FALSE |
CS_OPT_AUTHOFF |
Turns the specified authorization level off for the current server session. When a user logs in, all authorizations granted to that user are automatically turned on. |
Not applicable |
CS_OPT_AUTHON |
Turns the specified authorization level on for the current server session. When a user logs in, all authorizations granted to that user are automatically turned on. |
Not applicable |
CS_OPT_CHAINXACTS |
If this option is set to CS_TRUE, Adaptive Server uses chained transaction behavior. Chained transaction behavior means that each server command is considered to be a distinct transaction. Unchained transaction behavior requires an explicit commit transaction statement to define a transaction. |
CS_FALSE, meaning unchained transaction behavior |
CS_OPT_CURCLOSEONXACT |
If this option is set to CS_TRUE, all cursors opened within a transaction space are closed when the transaction completes. |
CS_FALSE |
CS_OPT_CURRREAD |
Sets a security label specifying the current read level. |
NULL |
CS_OPT_CURWRITE |
Sets a security label specifying the current write level. |
NULL |
CS_OPT_DATEFIRST |
This option sets the day considered to be the “first” day of the week. |
For us_english, the default is CS_OPT_SUNDAY. |
CS_OPT_DATEFORMAT |
This option sets the order of the date parts month/day/year for entering datetime or smalldatetime data. |
For us_english, the default is CS_OPT_FMTMDY. |
CS_OPT_FIPSFLAG |
If this option is set to CS_TRUE, Adaptive Server flags any nonstandard SQL commands that are sent. |
CS_FALSE |
CS_OPT_FORCEPLAN |
If this option is set to CS_TRUE, Adaptive Server joins tables in the order in which the tables are listed in the “from” clause of the query. |
CS_FALSE |
CS_OPT_FORMATONLY |
If this option is set to CS_TRUE, Adaptive Server sends back a description of the data rather than the data itself, in response to a select query. |
CS_FALSE |
CS_OPT_GETDATA |
If this option is set to CS_TRUE, then Adaptive Server returns information on every insert, delete, or update command. Adaptive Server returns this information in the form of a message result set and parameters that an application can use to construct the name of the temporary table that will contain the rows that will be inserted or deleted. An update consists of insertions and deletions. |
CS_FALSE |
CS_OPT_IDENTITYOFF |
Disables inserts into a table‘s identity column. For more information, see the set command in your Adaptive Server documentation. |
Not applicable |
CS_OPT_IDENTITYON |
Enables inserts into a table‘s identity column. For more information, see the set command in your Adaptive Server documentation. |
Not applicable |
CS_OPT_ISOLATION |
This option is used to specify a transaction isolation level. Legal levels are CS_OPT_LEVEL1 and CS_OPT_LEVEL3. Setting CS_OPT_ISOLATION to CS_OPT_LEVEL3 causes all pages of tables specified in a select query inside a transaction to be locked for the duration of the transaction. |
CS_OPT_LEVEL1 |
CS_OPT_NOCOUNT |
This option causes Adaptive Server to stop sending back information about the number of rows affected by each SQL statement. |
CS_FALSE |
CS_OPT_NOEXEC |
If this option is set to CS_TRUE, Adaptive Server processes queries through the compile step but does not execute them. This option is used with CS_OPT_SHOWPLAN. |
CS_FALSE |
CS_OPT_PARSEONLY |
If this option is set, the server checks the syntax of queries, returning error messages as necessary, but does not execute the queries. |
CS_FALSE |
CS_OPT_QUOTED_IDENT |
If this option is set to CS_TRUE, Adaptive Server treats all strings enclosed in double quotes as identifiers. |
CS_FALSE |
CS_OPT_RESTREES |
If this option is set, Adaptive Server checks the syntax of queries but does not execute them, returning parse resolution trees (in the form of image columns in a regular row result set) and error messages as needed, to the client. |
CS_FALSE |
CS_OPT_ROWCOUNT |
If this option is set, Adaptive Server returns only a maximum specified number of regular rows for select statements. This option does not limit the number of compute rows returned. CS_OPT_ROWCOUNT works somewhat differently from most options. It is always set on, never off. Setting CS_OPT_ROWCOUNT to 0 sets it back to the default, which is to return all the rows generated by a select statement. Therefore, the way to turn CS_OPT_ROWCOUNT off is to set it on with a count of 0. |
0, meaning all rows are returned |
CS_OPT_SHOWPLAN |
If this option is set to CS_TRUE, Adaptive Server will generate a description of its processing plan after compilation and continue executing the query. |
CS_FALSE |
CS_OPT_STATS_IO |
This option determines whether Adaptive Server internal I/O statistics are returned to the client after each query. |
CS_FALSE |
CS_OPT_STATS_TIME |
This option determines whether Adaptive Server parsing, compilation, and execution time statistics are returned to the client after each query. |
CS_FALSE |
CS_OPT_STR_RTRUNC |
If this option is set to CS_TRUE, Adaptive Server will be ANSI-compliant with regard to right truncation of character data. |
CS_FALSE |
CS_OPT_TEXTSIZE |
This option changes the value of the Adaptive Server global variable @@textsize, which limits the size of text or image values that Adaptive Server returns. When setting this option, you supply a parameter which is the length, in bytes, of the longest text or image value that Adaptive Server should return. |
32,768 bytes |
CS_OPT_TRUNCIGNORE |
If this option is set to CS_TRUE, Adaptive Server ignores truncation errors, which is standard ANSI behavior. If this option is set to CS_FALSE, Adaptive Server raises an error when conversion results in truncation. |
CS_FALSE |
srv_options lists the legal values and datatype for each option.