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

  • Home
  • SEARCH
  • 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 7949441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:59:57+00:00 2026-06-04T01:59:57+00:00

Clearly it’s not quite true that SQL floats are the same as C# Doubles

  • 0

Clearly it’s not quite true that SQL floats are the same as C# Doubles, as they can’t hold values of Infinity.

I have a very straightforward mathematical model that deals with probabilities and return periods.

When

Double Probability = 0d,

then by definition:

Double ReturnPeriod = Double.PositiveInfinity

When these properties are mapped to float parameters for an Insert command, I get an error at the DataService level as I try to execute the procedure:

The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 134 (“@RETURNPERIOD”): The supplied value is not a valid instance of data type float. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision.

How can I resolve this? I don’t want to resort to anything absurd like changing the schema to store a string representation of the ReturnPeriods, or to add a secondary column for every single float to store whether it’s +Inf, -Inf, or NaN.

Old 2006 posts like this one aren’t really helping me out.

  • 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-06-04T01:59:59+00:00Added an answer on June 4, 2026 at 1:59 am

    I think what is meant when they say SQL floats are equivalent to Double, is that their representation is similar (using mantis and exponent and 64bits encoding).

    I would suggest using Double.MaxValue as positive infinity and Double.MinValue as negative infinity. I doubt that you will get to use those values in your model.

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

Sidebar

Related Questions

Clearly, when GROUP BY clause used, columns that are not aggregate function should be
Clearly its not on their FAQ. Nor can I find it on the web.
This is clearly not appears like it wouldn't be a best practice. Can someone
The db2 9.7 sql reference clearly states that nvarchar and nclob datatypes are synonyms
I am clearly not understanding how to do this correctly, can someone set me
How can we clearly differ architectural term abstraction from a software component, can abstraction
How can you clearly illustrate multiple threads of execution in a sequence diagram or
I'm clearly a newb, and I was wondering if anyone knows how I can
Can someone clearly explain me how these functions of heap sort are working?? void
This is clearly not the case though. My JS : $(.job_charge.item-block).live({ mouseenter: function(){ $(this).find('.edit-and-delete').stop(true,true).fadeIn();

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.