OleDbSQLColumnsSortByOrdinal CLI/ODBC and IBM data server driver configuration keyword
Makes OLE DB's IDBSchemaRowset::GetRowset(DBSCHEMA_COLUMNS) return a row set sorted by the ORDINAL_POSITION column.
- db2cli.ini keyword syntax:
- OleDbSQLColumnsSortByOrdinal = 0 | 1
- IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="OleDbSQLColumnsSortByOrdinal" value="0 | 1"/>
Attention: The IBM data server
driver configuration
file (db2dsdriver.cfg) syntax is available in Db2 11.5.4 and later.
- Equivalent connection attribute:
- SQL_ATTR_SQLCOLUMNS_SORT_BY_ORDINAL_OLEDB
- Default setting:
- IDBSchemaRowset::GetRowset(DBSCHEMA_COLUMNS) returns the row set sorted by the columns TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME.
- Usage notes:
- The Microsoft OLE DB specification requires that IDBSchemaRowset::GetRowset(DBSCHEMA_COLUMNS) returns the row set sorted by the columns TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME. The IBM Db2® OLE DB Provider conforms to the specification. However, applications that use the Microsoft ODBC Bridge provider (MSDASQL) have been typically coded to get the row set sorted by ORDINAL_POSITION. Setting the OleDbSQLColumnsSortByOrdinal keyword to 1 will make the provider return a row set sorted by ORDINAL_POSITION.