SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Float representation problem

    Hi all,

    In my code when this command is processed :

    Response.Write(sql('ResultSprintA'))

    the output is 2,42

    But when this line is processed :

    Response.Write("<td><input type='text' name='Sprint"+j+"' value="+sql('ResultSprintA')+"></td>")

    the output is 2.42

    I don't understand why there is a coma in the first line and a period in the second!

    Can you help me?

  2. #2
    SitePoint Guru
    Join Date
    Jun 2007
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which is correct ?

    Also, if you are using vbscript language, try concatenating with the ampersand sign (&) instead of the plus sign (+).

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the concatening help It's been a while since I coded ASP.

    It does'nt matter the way the output is saved in database because the database is still empty!

    I found a way to solve this problem: I put american us in regionnal setting, the original setting was French Canadian (wich I am )

    and when I insert value in database I do a parseFloat() to ensure that is not a string. This way seems to work well!

    Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •