float: use of comma's versus dots: 12,2 or 12.2

Discussion in 'ASP .Net' started by nicholas, Nov 18, 2004.

  1. nicholas

    nicholas Guest

    I have a webform that inserts product data in an sql database.
    The price field is of the type "float".
    On my web form, if I insert for example 12,2 in the price field => OK
    But if I insert 12.2 I get an error.

    Now the problem is that if I use the decimal-key (=dot) on my numeric path,
    it inserts a "." instead of a ","
    So I have to use the comma from outside the numeric path.

    I have several computers, and all do the same.
    I'm from belgium and in belgium, we use a comma as separator.

    The weird thing is that if I for example open MS Excel and insert a number
    with decimal , than the decimal separtor is inserted as a comma ",".

    Hope someone can help me.

    THX
    nicholas, Nov 18, 2004
    #1
    1. Advertising

  2. > On my web form, if I insert for example 12,2 in the price field => OK
    > But if I insert 12.2 I get an error.


    Do you use ADO.NET Parameters?


    --
    Daniel Fisher(lennybacon)
    MCP ASP.NET C#
    Blog: http://www.lennybacon.com/
    Daniel Fisher\(lennybacon\), Nov 18, 2004
    #2
    1. Advertising

  3. nicholas

    nicholas Guest

    dbComm.Parameters.Add("@productunitprice",SqlDbType.float)

    "Daniel Fisher(lennybacon)" <info@(removethis)lennybacon.com> wrote in
    message news:udl$...
    > > On my web form, if I insert for example 12,2 in the price field => OK
    > > But if I insert 12.2 I get an error.

    >
    > Do you use ADO.NET Parameters?
    >
    >
    > --
    > Daniel Fisher(lennybacon)
    > MCP ASP.NET C#
    > Blog: http://www.lennybacon.com/
    >
    >
    >
    nicholas, Nov 18, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim West
    Replies:
    4
    Views:
    1,405
    Jeff Schwab
    Jan 16, 2004
  2. bd
    Replies:
    0
    Views:
    605
  3. Carsten Fuchs
    Replies:
    45
    Views:
    1,507
    James Kanze
    Oct 8, 2009
  4. Christoffer Sawicki
    Replies:
    5
    Views:
    240
    Christoffer Sawicki
    Sep 2, 2006
  5. Paul Butcher
    Replies:
    12
    Views:
    692
    Gary Wright
    Nov 28, 2007
Loading...

Share This Page