Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4006704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:32:47+00:00 2026-05-20T08:32:47+00:00

I have a C# System.Double property which may contains value like 1e250 : public

  • 0

I have a C# System.Double property which may contains value like 1e250 :

public virtual double DoubleValue {get; set;}

The property is mapped to a BINARY_DOUBLE column :

<property name="DoubleValue" column="VALUE_BINARY_DOUBLE"/>

Max value for Binary_Double is about 1.7e+308 (Oracle doc), but I’m getting an exception :
ORA-01426 : numeric overflow

Problem appears even when executing a query through SQL+. I have to use the TO_BINARY_DOUBLE cast to make it work. In my understanding, the number supplied is implicitly converted to a NUMBER : my query work with 1e125 (max for NUMBER is 1e126) but won’t work with 1e250.

I’ve also tried those mappings, without success :

<property name="DoubleValue" column="VALUE_BINARY_DOUBLE" type="System.Double"/>
<property name="DoubleValue" column="VALUE_BINARY_DOUBLE" type="binary"/>

Using : Oracle 11G – NHibernate 2.1.0 – .Net 3.5 SP1

Thanks for any lead you may provide !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:32:47+00:00Added an answer on May 20, 2026 at 8:32 am

    Here is the workaround we are using, since we didn’t find any solution :
    Add a property in C# :

    public virtual string DatabaseDoubleValue
    {
        get
        {
            return DoubleValue.ToString();
        }
        set
        {
            DoubleValue = double.Parse(value);
        }
    }
    

    Change mapping to

    <property name="DatabaseDoubleValue" column="VALUE_BINARY_DOUBLE"/>
    

    Add a trigger on the VALUE_BINARY_DOUBLE column :

    FOR EACH ROW
    BEGIN
        :NEW.VALUE_BINARY_DOUBLE := TO_BINARY_DOUBLE(:NEW.VALUE_BINARY_DOUBLE);
    END;
    

    Works fine that way!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a system in place which applies calculations to a set of numbers
I have a class in system-C with some data members as such: long double
I have a system that uses a meta refresh to a logout page, which
I have a system which sits on a web server and generates files on
I have a custom WPF Canvas, upon which I would like to show a
I have a control (derived from System.Windows.Forms.Control) which needs to be transparent in some
I have the following classes: public class Person { public String FirstName { set;
I have created the following type using implicit type construction: open System type Matrix(sourceMatrix:double[,])
I have a web application, in which one of the JSPs contain: PropertyConfigurator.configure(System.getenv(MY_HOME) +
We have system here that uses Java JNI to call a function in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.