Note that there are some explanatory texts on larger screens.

plurals
  1. PONHibernate Oracle Single incorrect Precision
    primarykey
    data
    text
    <p>I am using Oracle9i and NHibernate 3.1.0.4 and FluentNhibernate 1.2.0.712</p> <p>NHibernate is configured as follows...</p> <pre><code>&lt;property name="dialect"&gt;NHibernate.Dialect.Oracle9iDialect&lt;/property&gt; &lt;property name="connection.driver_class"&gt;NHibernate.Driver.OracleClientDriver&lt;/property&gt; &lt;property name="connection.connection_string"&gt;Data Source=ORA9TEST;User ID=NOPE;Password=NOPE;&lt;/property&gt; &lt;property name="query.substitutions"&gt;true=1;false=0&lt;/property&gt; &lt;property name="show_sql"&gt;true&lt;/property&gt; </code></pre> <p>It generates this insert statemanet</p> <pre><code>2012-08-10 16:33:36,380 [DEBUG] 15 NHibernate.SQL - INSERT INTO FACT_Data (STime, subg_number, subg_index, measurement, Rj, InvalidSpec, data_uid, WrittenState, dept_id, specs_id, data_id) VALUES (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10);:p0 = 2/7/2012 12:49:57 AM [Type: DateTime (0)], :p1 = 103 [Type: Int32 (0)], :p2 = 0 [Type: Int32 (0)], :p3 = 30.346 [Type: Single (0)], :p4 = 0 [Type: Single (0)], :p5 = False [Type: Boolean (0)], :p6 = 0 [Type: Int32 (0)], :p7 = 0 [Type: Int32 (0)], :p8 = 2 [Type: Int32 (0)], :p9 = 45423 [Type: Int32 (0)], :p10 = 1178436 [Type: Int32 (0)] </code></pre> <p>The Column FACT_Data.Measurement is type NUMBER(*,6)</p> <p>When I read that row back out, instead of the Measurement value being 30.346 it is 30.346001. What can I do to make it store my Single value correctly without the extra 0.000001?</p> <p>Please and thank you</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload