Connection string keywords - Data types
Use these IBM® i Access ODBC driver connection string keywords to change the Data types properties of the ODBC connection.
The following table lists connection string keywords for the Data types properties that are recognized by the IBM i Access ODBC driver:
Keyword | Description | Choices | Default |
---|---|---|---|
DFT or DateFormat | Specifies the date format used in date literals within SQL statements. | 0 = yy/dd (*JUL) 1 = mm/dd/yy (*MDY) 2 = dd/mm/yy (*DMY) 3 = yy/mm/dd (*YMD) 4 = mm/dd/yyyy (*USA) 5 = yyyy-mm-dd (*ISO) 6 = dd.mm.yyyy (*EUR) 7 = yyyy-mm-dd (*JIS) |
5 |
DSP or DateSeparator | Specifies the date separator used in date literals within SQL statements. This property has no effect unless the DateFormat property is set to 0 (*JUL), 1 (*MDY), 2 (*DMY), or 3 (*YMD). | 0 = "/" (forward slash) 1 = "-" (dash) 2 = "." (period) 3 = "," (comma) 4 = " " (blank) |
1 |
DEC or Decimal | Specifies the decimal separator used in numeric literals within SQL statements. | 0 = "." (period) 1 = "," (comma) |
0 |
DECFLOATERROROPTION | Specifies whether a warning or data mapping error is reported when encountering an error with the decimal floating point data type. If not provided, the server attribute value is unchanged. | 0 = Report decimal floating point error as a
data mapping error 1 = Report decimal floating point error as a warning |
0 |
DECFLOATROUNDMODE | Specifies the rounding mode, when rounding is allowed for a result. | 0 = ROUND_HALF_EVEN - round to nearest digit.
If equidistant, round to the nearest even digit. This is the default
rounding mode. 1 = ROUND_HALF_UP - round to nearest digit. If equidistant, round up. 2 = ROUND_DOWN - round to nearest lower digit. This is the same as truncation. 3 = ROUND_CEILING - round towards +infinity. 4 = ROUND_FLOOR - round towards -infinity. 5 = ROUND_HALF_DOWN - round to nearest digit. If equidistant, round down. 6 = ROUND_UP - round to nearest higher digit. |
0 |
MAPDECIMAL |
Specify the format for the results of a DECFLOAT
operation. Note: Merge the three MAPDECIMAL and FLOATDESCRIBE strings
into a single string before using.
|
1 = SQL_ VARCHAR 3 = SQL_ DOUBLE |
1 |
TFT or TimeFormat | Specifies the time format used in time literals within SQL statements. | 0 = hh:mm:ss (*HMS) 1 = hh:mm AM/PM (*USA) 2 = hh.mm.ss (*ISO) 3 = hh.mm.ss (*EUR) 4 = hh:mm:ss (*JIS) |
0 |
TSP or TimeSeparator | Specifies the time separator used in time literals within SQL statements. This property has no effect unless the "time format" property is set to "hms". | 0 = ":" (colon) 1 = "." (period) 2 = "," (comma) 3 = " " (blank) |
0 |
XMLSTRIPWS or CurrentImplicitXmlParseOption | Specifies the XMLPARSE option to use for the connection. This attribute indicates how whitespace in serialized XML data should be handled by DB2® when the data is implicitly parsed without validation. | 0 = STRIP WHITESPACE 1 = PRESERVE WHITESPACE |
0 |
XMLDECLARATION or XMLDeclaration | Specifies the XML Declaration to return with XML columns that are returned in result sets. | 0 = No declarations or byte order marks (BOMs)
are added to the output buffer. 1 = A byte order mark (BOM) in the appropriate endianness is prepended to the output buffer if the target encoding is UTF-16. 2 = A minimal XML declaration is generated, containing only the XML version. 4 = An encoding attribute that identifies the target encoding is added to any generated XML declaration. Therefore, this setting only has effect when the setting of 2 is also included when computing the value of this attribute. 7 = An encoding attribute that indicates that a BOM and an XML declaration containing the XML version and encoding attribute are generated during implicit serialization. |
7 |