skip to main content
OpenAccess SDK SQL Engine core methods for .NET : Methods for .NET reference : dam_setOption : Connection Options
 

Connection Options

For the connection options. set the option type to DAM_CONN_OPTION and the object handle to the current connection handle.
 
Table 201: Connection Options Values for dam_setOption  
Option (iOption)
Option Value
DAM_CONN_OPTION_BLANKS_IN_ STRINGS
Determines whether the OpenAccess SDK SQL Engine ignores trailing blanks in strings when performing string comparisons and LIKE processing. The actual string values in and out of the IP are not stripped. This is useful when the database stores information with space padding but the user in the query does not provide the padded blanks. Valid values are:
DAM_BIS_IGNORE_NONE (default) – compare as is unless the SQL_OP_IGNORE_BLANKS bit is set in the OA_SUPPORT field of the column.
DAM_BIS_IGNORE_TRAILING – ignore trailing blanks and compare; applies to all columns.
If this option is set, the strings 'Joe' and 'Joe ' are considered equal.
DAM_CONN_OPTION_CASE_IN_ STRINGS
Determines whether the OpenAccess SDK SQL Engine ignores case when performing string compares. This option is useful when the database has case insensitive data. Valid values are:
DAM_CIS_IGNORE_NONE (default) – compare as is unless the SQL_OP_IGNORE_CASE_IN_STRINGS bit is set in the OA_SUPPORT field of the column.
DAM_CIS_IGNORE_ALL – perform case insensitive string comparisons.
This is a global setting. To apply this to specific columns, leave this option as DAM_CIS_IGNORE_NONE and set the SQL_OP_IGNORE_CASE_IN_STRINGS flag in the OA_SUPPORT field of the schema definition for those columns.
DAM_CONN_OPTION_CASE_IN_LIKE
Determines whether LIKE processing is case sensitive. Valid values are:
DAM_CIL_IGNORE_NONE – case sensitive unless the SQL_OP_IGNORE_CASE_IN_LIKE bit is set in the OA_SUPPORT field of the column.
DAM_CIL_IGNORE_ALL (default) – case insensitive. Applies to all columns.
DAM_CONN_OPTION_INDEX_ OPTIMIZATION
Determines whether the OpenAccess SDK SQL Engine performs optimization when identifying a search column. This option should not be changed unless your IP handles most of the optimization. Valid values are:
DAM_INDEX_IGNORE_NONE (default) – perform default optimization
DAM_INDEX_IGNORE_ALL – disable default optimization
DAM_CONN_OPTION_JOINORDER_ USING_SEARCHCONDITION
Determines whether search conditions are used when determining the join order. Valid values are:
DAM_PROCESSING_OFF – ignore search conditions in determining the join order.
DAM_PROCESSING_ON (default) – make use of search conditions in determining the join order as detailed in the Join Processing section in the OpenAccess SDK SQL Engine Programmer’s Guide.
DAM_CONN_OPTION_JOINORDER_ USING_FKEY
Determines whether OA_FKEYS information is used when determining the join order. Valid values are:
DAM_PROCESSING_OFF – ignore foreign fkeys in determining the join order.
DAM_PROCESSING_ON (default) – make use of foreign keys in determining the join order as detailed in the Join Processing section in the OpenAccess SDK SQL Engine Programmer’s Guide.
DAM_CONN_OPTION_JOINORDER_ USING_STARJOIN
Enables star join detection and optimization. Valid values are:
DAM_PROCESSING_ON – enable Star join detection and optimization.
DAM_PROCESSING_OFF (default) – disable star join detection and optimization.
DAM_CONN_OPTION_JOINORDER_
USING_STATISTICS
Determines whether the OpenAccess SDK SQL Engine considers the cost-based join order algorithm when determining the order to join tables when executing a query.
Valid values are:
DAM_PROCESSING_OFF (default) – do not use the cost-based join order algorithm to determine the table join order.
DAM_PROCESSING_ON – use the cost-based join order algorithm to determine the table join order. Whether the cost-based join order algorithm is actually used depends on whether conditions are met in the priority hierarchy for join algorithms. For more information about join processing and the join algorithm hierarchy, refer to the OpenAccess SDK SQL Engine Programmer’s Guide.
DAM_CONN_OPTION_JOINORDER_ VERIFY_INDEX_ON_JOIN_CONDITION
Determines whether the OpenAccess SDK SQL Engine checks if inner tables have an index on the join conditions. If inner tables do not have an index on join conditions, the join ordering should not be used. This is used to check if join ordering based on search condition or foreign keys should be used. Valid values are:
DAM_PROCESSING_OFF(default) – do not check indexes on join conditions
DAM_PROCESSING_ON – check indexes on join conditions
DAM_CONN_OPTION_NEGATIVE_ ZERO_RESULT
Determines whether the OpenAccess SDK SQL Engine converts negative zero to zero. Valid values are:
DAM_NZR_CONVERT_NONE (default) – Return negative zero result as is.
DAM_NZR_CONVERT_ALL – convert negative zero (-0.0) to zero (0.0).
DAM_CONN_OPTION_NUMERIC_ RESULT
Determines whether the result from an aggregate function that operates on SQL_NUMERIC data is rounded to the scale of the input.
DAM_NR_ROUND_NONE (default) – the output of an aggregate function is returned with higher scale then the input. In the following example, this option returns a value of 518.8766667 for the avg(numerictype) expression.
DAM_NR_ROUND_ALL – the output of an aggregate function is rounded to the scale of the numeric argument. In the example below, this option returns a value of 518.88 for the avg(numerictype) expression.
For example,
create table atypes(id integer, numerictype numeric(8,2))
insert into atypes(id, numerictype) values (1, 349.61);
insert into atypes(id, numerictype) values (2, 572.21);
insert into atypes(id, numerictype) values (3, 634.81);
DAM_CONN_OPTION_POST_ PROCESSING
Determines whether the OpenAccess SDK SQL Engine performs post-processing (GROUP BY, ORDER BY). This option is used when using SQL pass-through mode. Valid values are:
DAM_PROCESSING_ON (default) – the OpenAccess SDK SQL Engine should handle post-processing.
DAM_PROCESSING_OFF – the OpenAccess SDK SQL Engine should skip post-processing operations.