[Symptom]
When the DATE type field of DB is acquired by the script development model API "DatabaseManager", different JavaScript types are returned depending on the version of Oracle (including the version of the JDBC driver).
[Cause]
Starting with Oracle Database 11g Release 1 (11.1), "oracle.sql.DATE" will be mapped to "java.sql.Timestamp" by default.
("oracle.sql.DATE" is mapped to "java.sql.Date" in Oracle Database 9.0.1 to 11.0.)
Due to this effect, when the DATE type field of DB is acquired by the script development model API "DatabaseManager", different JavaScript types are returned depending on the version of Oracle (including the version of the JDBC driver).
Specifically, if you are using Oracle Database 9.0.1 to 11.0, the JavaScript Date type will be returned, and if you are using Oracle Database 11.1 or later, the JavaScript String type will be returned.
[Handling method]
Set Java system property "oracle.jdbc.mapDateToTimestamp" to false.
Specifically, add the following to "jvm_args" in resin installation folder/conf/resin.properties
-Doracle.jdbc.mapDateToTimestamp=false</option>
For more information on Java system properties "oracle.jdbc.mapDateToTimestamp", please see the Oracle documentation.
Oracle Database JDBC Developer Guide and Reference 11g Release 1 (11.1)
- [A JDBC Reference Information] - [Mapping from Oracle Object Type to SQL DATE Data Type]
https://docs.oracle.com/cd/F19136_01/jjdbc/JDBC-reference-information.html#GUID-271C19F0-459D-4DA8-8C1D-F04AA5B8CD08__GUID-83B0777E-468F-4FDD-B55C-C5A36D962C84 (Japanese)
-- Target ------------------------------------------------------------------------
iAP/Accel Platform/All Updates
--------------------------------------------------------------------------------
FAQID:586