What I forgot to mention: We are currently using an Oracle DB, but we need 
the application to run on different types of databases (eg MySQL, MSSQL, 
etc). Using Oracle specific code would therefore not be an option.

Am Montag, 14. Mai 2018 12:12:11 UTC+2 schrieb Christoph Lucas:
>
> Hello,
>
> We are running an Oracle Database (version 12.2). In our application, we 
> need to store double values. The Oracle type equivalent seems to be 
> BINARY_DOUBLE [1]. During the build phase, we do not have the Oracle 
> database available. So we use the same schema with the BINARY_DOUBLE column 
> on an hsql DB and use this as basis for the code generation. In the 
> generated code this results in a column with type SQLDataType.DOUBLE, 
> which seems to be correct.
>
> The problem arises when storing very small values (< E-130). When binding 
> the value in the prepared statement, the method 
> OraclePreparedStatement.setDouble is 
> used, instead of OraclePreparedStatement.setBinaryDouble. That method 
> converts the Double to a Number, which is only supported down to E-130 [2]. 
> Therefore, an underflow exception is thrown.
>
> What is the correct way to store a double value on an Oracle DB using 
> jOOQ? Any help would be greatly appreciated!
>
> Best regards,
> Christoph
>
> [1] https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#g195556
> [2] https://community.oracle.com/thread/460586
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to