8.2.34 setHADBOrderMode(int mode)
- Organization of this subsection
(1) Function
This method sets for this Connection object the sort order for character string data in a SELECT statement in which the ORDER BY clause is specified.
The information set in this method corresponds to the adb_clt_sql_order_mode operand in the client definition.
(2) Format
public void setHADBOrderMode(int mode) throws SQLException
(3) Arguments
- int mode
-
Specifies the sort order for character string data in a SELECT statement in which the ORDER BY clause is specified. Specify one of the following values:
-
AdbConnection.HADB_SQL_ORDER_MODE_BYTE
Sort character string data by bytecode.
-
AdbConnection.HADB_SQL_ORDER_MODE_ISO
Sort character string data by sort code (ISO/IEC 14651:2011 compliance).
-
(4) Return value
None.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
The Connection object is closed.
-
A transaction has already started.
-
The specified sort order is not one of the following:
• AdbConnection.HADB_SQL_ORDER_MODE_BYTE
• AdbConnection.HADB_SQL_ORDER_MODE_ISO
(6) Notes
-
The sort order for character string data in a SELECT statement in which the ORDER BY clause is specified is determined in the priority order shown below (the smaller the number, the higher the priority). For example, if 1 and 2 are both specified, 1 takes effect.
-
Sort order specified with the setHADBOrderMode method
-
Sort order specified with the adb_clt_sql_order_mode system property
-
Value of the adb_clt_sql_order_mode property specified in the info argument of the getConnection method of the DriverManager class
-
Value of adb_clt_sql_order_mode property specified in the url argument of the getConnection method of the DriverManager class
-
Sort order specified with the adb_sql_order_mode server definition operand
-
-
When the setHADBOrderMode method is used to specify the sort order for character string data in a SELECT statement in which the ORDER BY clause is specified, that sort order setting is not inherited when the Connection object has been pooled and then reused. In such a case, the sort order remains the same as it was before the setHADBOrderMode method was executed.
-
This is an HADB-specific method provided by the AdbConnection interface. For details about the execution method, see 12.2 Wrapper interface.