The Open Data Services ODBC driver uses these flags to determine the capability of the gateway to handle SQL Server - specific features:
-
IDS_FEATURE_FMTONLY_SUPPORT
-
This flag is set to Y if the gateway can handle the SET FMTONLY ON/OFF statement. The Open Data Services ODBC driver sends a SET FMTONLY ON statement when a statement has been prepared (SQLPrepare called) and metadata (SQLDescribeCol, SQLColAttributes, or SQLNumResultCols) is required before it has been executed (SQLExecute). The driver sets FMTONLY on, sends the SQL statement, and then sets FMTONLY off. It is expected that the gateway will return only the metadata, without any rows of data.
If this flag is set to N, the Open Data Services ODBC driver tries to add a WHERE 1=2 clause to a SELECT statement and then executes it to get the metadata. This will work only for a SELECT statement in which there is a single statement in the batch or when multiple statements are separated by semicolons. This fallback behavior may not work or may not be efficient, depending on the particular query involved and the type of back-end data source.
-
IDS_FEATURE_NOEXEC_SUPPORT
-
This flag is set to Y if the gateway can handle the SET NOEXEC ON/OFF statement. The Open Data Services ODBC driver sends a SET NOEXEC ON statement when a statement is to be prepared (SQLPrepare called). It is expected that the gateway will return any errors found in processing but not execute the statement. If the DBMS supports a true prepare model, the statement should be prepared and the plan held for later execution. For more information, see Prepare/Execute Handling.
-
IDS_FEATURE_HOLDLOCK_SUPPORT
-
This feature is set to Y if the gateway supports the HOLDLOCK keyword of the SQL Server SELECT statement to hold locks for the duration of the transaction. When SQLConnectOption SQL_TXN_ISOLATION is set to SQL_TXN_SERIALIZABLE, the Open Data Services ODBC driver adds a HOLDLOCK keyword after each table name in the select statement.
If set to N, the HOLDLOCK keyword is never added. For more information, see Transaction Handling and Isolation Levels.
-
IDS_FEATURE_NOTNULL_DEFAULT
-
This flag is set to Y if the gateway has a default of NOT NULL for the column definition in a CREATE TABLE or ALTER TABLE statement. The ODBC default is NULL. If neither NOT NULL nor NULL is specified, the Open Data Services ODBC driver adds NOT NULL after each column name. If this flag is set to N, these statements are unchanged.
-
IDS_FEATURE_TEXTPTR_SUPPORT
-
This flag is used by the Open Data Services ODBC driver to determine the level of text pointer support supported by the gateway. The following settings are supported:
|
|
|
|
|
|
Flag Setting |
Description |
N |
No text pointer support |
R |
READTEXT |
W |
WRITETEXT |
U |
UPDATETEXT |
B |
READTEXT and WRITETEXT |
A |
READTEXT, WRITETEXT, and UPDATETEXT |
The Open Data Services ODBC driver currently uses WRITETEXT to send LONG VARCHAR or LONG VARBINARY data that is longer than 64K to the gateway. If the data is shorter than 64K, it is treated normally. If the gateway does not support text pointers, set the flag to N. This restricts the ODBC application from sending data that is longer than 64K to LONG VARCHAR/VARBINARY columns. Currently, the Open Data Services ODBC driver does not use READTEXT, so output data from these columns is only included in the normal result set. The Open Data Services ODBC driver uses UPDATETEXT when an update of a long data column affects multiple rows.
-
IDS_FEATURE_RPC_SUPPORT
-
The following flag settings are supported:
|
|
|
|
|
|
Flag
setting |
Description |
Y |
The gateway supports execution of procedures through the RPC mechanism in addition to a language event. The Open Data Services ODBC driver will use the RPC invocation for execution of the catalog stored procedures and canonical procedure invocation. This is advantageous since the data is presented in binary form and there is no SQL statement to parse. RPC can also be used for prepare/execute, if supported. For more information, see Prepare/Execute Handling. |
N |
The Open Data Services ODBC driver will execute any procedure invocation using SQL statements as a language event. The IDS_AUX_RPC_TEXT string contains the text added as a prefix to the function name. |
B |
Executing multiple RPCs in a single batch is supported. |
-
IDS_FEATURE_STRIP_SEPARATORS
-
This flag is set to Y if the gateway does not support semicolons between statements in a batch. The Open Data Services ODBC driver changes the separators to blanks.
This flag is set to N if the gateway or DBMS supports the semicolon statement separator.
-
IDS_FEATURE_TSQL_OJ_SUPPORT
-
This flag is set to Y if the gateway supports the SQL Server outer join syntax (*= or =*). The Open Data Services ODBC driver converts a canonical outer join to the SQL Server syntax.
This flag is set to N if the gateway does not support the SQL Server outer join syntax. In this case, the Open Data Services ODBC driver will send the canonical form through to the gateway for it to handle. If the gateway does not support either the SQL Server or canonical form, the SQLGetInfo SQL_OUTER_JOINS option should be set to N.
-
IDS_FEATURE_EXEC_THRU_PROC
-
This flag is set to Y if the gateway wants the Open Data Services ODBC driver to create a procedure and execute it for the prepare/execute model. If set to N, execution of a prepared statement will have the SQL statement sent with each execution. For more information, see Prepare/Execute Handling.
-
IDS_FEATURE_KEEP_PARM_MARKERS
-
This flag is set to Y if the gateway wants the parameter markers (question marks) to be retained when the statement is sent for preparation. If this flag is set to N, the Open Data Services ODBC driver substitutes dummy data of the proper type for the parameter markers.
-
IDS_FEATURE_AS_ALIAS
-
This flag is set to Y to tell the ODBC driver to keep the AS keyword ('column_name AS column_alias') in a SQL statement. If this flag is set to N, the ODBC driver removes the AS keyword.
-
IDS_FEATURE_ASC_INDEX
-
This flag is set to Y to tell the ODBC driver to keep the ASC and DESC keywords in a CREATE INDEX statement. If this flag is set to N, the ODBC driver removes these keywords.
-
IDS_FEATURE_CURSOR_SUPPORT
-
This flag is set to Y if the gateway supports the Microsoft SQL Server 6.0 cursor extended stored procedures. This allows the gateway to expose scrollable, updateable cursors to the client application. If this flag is set to N, the gateway does not support these cursor extended stored procedures.
-
IDS_FEATURE_DECNUM_SUPPORT
-
This flag is set to Y if the gateway supports data in the Open Data Services SRVDECIMAL and SRVNUMERIC format. If this flag is set to N, the gateway does not support these datatypes.